TP and tp again

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.

Bye,

Eric

Eric Masseran

LinkedIn 

2 comments to TP and tp again

  • Samuel Tardieu

    You must be kidding, right? The debug option does not prevent you from using some functionality, if it breaks, it means you are not allowed to use it there!

  • Éric

    You’re right! That’s the reason why, when I have discovered it was not a code mistake but an interdiction from chibios, I chose an other way to implement it.

    By the way, if you could look if I have implemented a clean method, it would be nice. Moreover, if it’s not good I can change tomorrow 🙂