[STM32F4] End of the labwork and the challenge

Hello,

This week, we have to finish the stm32 labwork and what a mess! I was not early. However, I got a really good experience. I’m now able to drive leds with pwm, handle buttons and trim, and even create a tcp client.
The most difficult part was the tcp client, we had to modify the lwipthread.c file and a lot of functions came from “nowhere”. When I have understood how it works, I see how it is powerful. Now, I still have some troubles : the connection is not very fast and many connections in a loop don’t work perfectly.

For the challenge, I have succeed two steps and have reached the third too late. It was around 18h45 and it stopped earlier this year : 19h30. Maybe, it was possible but I feel tired… During the morning, something strange is appeared. I have implemented a function which was called in my tcp client. But in fact, it was never called and even in gdb. In gdb, it was missing! I will find the commit and try again at home. If the problem is still present, I really want help from the teachers in order to discover the mistake. In the afternoon, I have changed and have implemented an other technique. I have learned how to use MailBox in chibios aka queue.

Today, I solve a strange behavior from my board at home. I have implemented a thread which toggles a led every time something on the serial is received. At the beginning of each program, the led was toggling ten times and I got back this : “AT?PORT”. Other students have had problem today with the serial and it was owing to the modem manager. Thus, when I came back home I discovered that modem manager was in my fedora too. Like I expected, after removing it, it worked so well!

Until now, let’s go back to the project!

Eric

[Kudly] PCB sent to prod & STM32

Hi,

After one week in Warsaw, I went back on previous Sunday and I continued to work on Kudly PCB and on my STM32 exercises.

First, we finally sent our PCB design to production ! We spent lot of time on schematic but now we know good practices like write a routing table or clearly know each ship consumption to choose best power supply. For the placement and routing, we tried but Alexis is definitely better !

Secondly, I succeeded to implement PWM, trimmer and serial over USB communication ! Now I’m working on TCP/IP…

Kudly’s PCB and TP

Hello everybody,

I couldn’t post sunday, so i will recap my last 2 days of work. First of all, sunday night we worked with my team mates on our PCB, our schematic had some mistakes due to SPI protocol who was apparently misunderstood by us.

We also try  a positioning of our components, but it changed on Monday because we bought a teddy bear and decided where the camera and PIR will be( in the eyes ), our PCB shape due to this.

On Monday afternoon and today, I worked on my TP and I progressed a lot, by exemple, I implemented the ADC, the buzzer and the USB but my USB program had some fails on my PC but not on my team mates’ one. I discovered that my Minicom tried to speak with my card like with a modem, so it sent some characters like “A” or “\r” whereas I only sent others characters. I also discovered that one of my debug options was disabled and some errors were not detected and my program wasn’t so good because I used bad functions, so I changed them.

Today, I also tried to clean my repositories and main program because I used threads in a bad way and it wasn’t very cleared in it.

To end up, we are proud to announce you the sending of our PCB to production !! Sorry for the long post, here’s not a potato 😉

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