Since last week end, I’m working on the STM23F4 tp. I have discovered the callback method by implementing a pwm. However, I have got a surprise too. I firstly believed that the JTAG was working but in fact it didn’t. I have had to modify board.h again and after it worked.
Yesterday was a full day, from morning until night but very instructive. I have implemented the buttons, the potentiometer, the buzzer and finally the serial over usb.
Today, I have seen that I have got a problem with my serial. The datareceiver callback was called but after the mcu panicked. I solved this problem after hours of debugging. I have taken so much time because, the “same” code worked with Dimitri. The fact was the problem was not in main.c but in chconf.h. I have set to TRUE a debug option which was not necessary (CH_DBG_SYSTEM_STATE_CHECK). This option forbids the use of functions during interruption like sdWrite. Thus, I have used an another thread which are handle by Event (Broadcast and EventSource).
Next, I will stop using serial functions but serial over usb functions, work on the tcp/ip.