Skip to content

Tags

#embedded

Posts tagged #embedded on Dynamo Geeks: 3 posts from the community, most useful first.

3 posts

Posts tagged #embedded

  1. Question

    How do you unit test firmware? We test almost nothing on host

    Honest question. In my team all the testing is on the target hardware: flash, run, look at the logs and the scope. We have some integration tests on a HIL bench but zero unit tests. When I propose unit tests, the people say is impossible because the code touch registers everywhere. Is a codebase of around 60k lines of C, STM32, FreeRTOS. The drivers call the HAL directly from the application logic in many places.…

    Diego Ramírez3likes3comments

  2. Article

    volatile is not a mutex: sharing data between an ISR and your main loop

    Every few months a junior in my team come with the same bug: a counter updated in an interrupt, read in the main loop, and sometimes the value is garbage. And the first answer is always "but I put volatile". So here is the explanation I give them, maybe is useful for someone else. What volatile does volatile tells the compiler: this variable can change outside of the normal program flow, so read it from memory every…

    Diego Ramírez3likes3comments

  3. Experience

    The CAN node that went bus-off only on cold mornings

    This was some years ago but I still think about it every winter. We had a body control module, nothing special, talking on CAN at 500 kbit/s with the other modules. On the test bench everything perfect. In the field, some customers report that the module "die" in the morning and come back after the car is driving some minutes. Only in the north. Only in winter. First we suspect the power supply, because cold…

    Diego Ramírez2likes3comments