Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 4 months ago.
Nucleo_printf uart example not working
Hello,
I bought the Nucleo-F767ZI board and tried to flash the uart example called nucleo_printf. I downloaded the code from the mbed compiler and flashed it using openocd. Unfortunately nothing happens, not even the LED is blinking.
Deleting all the code related to the uart, the LED is blinking properly.
Someone can help me?
Thank you in advance, Thomas
Question relating to:
2 Answers
7 years, 4 months ago.
Hello I've the same problème when il use the exemple. But it's OK when i creat à new project with the same program main () But when i want to attach a method from a class, thé result is not ok. Exemple : This is Ok :______________
- include "mbed.h"
DigitalOut myled(LED1); Serial pc(USBTX,USBRX); Serial test(PC_6,PC_7); void pcrx(void) { if (pc.readable()) test.putc(pc.getc()); } void testrx(void) { if (test.readable()) pc.putc(test.getc()); } int main() { pc.baud(9600); pc.attach(&pcrx,Serial::RxIrq); test.attach(&testrx,Serial::RxIrq); ....
This is not ok before os 5.......................................................... Wifly is a class... void Wifly::handler_rx(void) { read characters while (wifi.readable()) buf_wifly.queue(wifi.getc()); }
void Wifly::attach_rx(bool callback) { if (!callback) wifi.attach(NULL); else wifi.attach(this,&Wifly::handler_rx,Serial::RxIrq); this is on error }