Commit graph

8 commits

Author SHA1 Message Date
Thomas Kolb d50f2cd723 Make the timing more predictable
This implements multiple measures for a more consistent control loop:

- Use Alarm0 to generate a trigger signal every millisecond. This
  ensures that the loop’s update rate is constant.
- Introduces the Logger module to handle UART communication in a
  non-blocking way (no interrupts, though). The Logger module has a
  internal, statically allocated queue to accomplish this.
2023-01-15 00:47:55 +01:00
Thomas Kolb 2f8516cce7 Added nonblocking UART logging module 2023-01-15 00:42:58 +01:00
Thomas Kolb accfc73248 Implement a simple output voltage regulator
To be improved: inconsistent timing, very slow iteration time.
2023-01-07 23:21:43 +01:00
Thomas Kolb edf697d22b Cleanup: remove superfluous LED pwms 2023-01-07 17:25:04 +01:00
Thomas Kolb 5682479aad adc: fixed channel readout and convert values 2023-01-06 23:42:08 +01:00
Thomas Kolb 28bd3b20ab Read multiple ADC channels (maybe)
At least this is compiling without errors now.

- Added the ext_adc module abstracting the ADC communication (with the
  AdcContext struct).
- SPI and necessary DMA channels are now passed into the AdcContext
  struct and moved around on each transfer.
- Transfers seem to be triggered, but the returned values are still
  wrong (either 0 or 4095). This still needs to be debugged.
2023-01-06 01:25:10 +01:00
Thomas Kolb 1a6e442815 Add dummy code to read from the external ADC 2023-01-03 22:29:01 +01:00
Thomas Kolb f172e071f8 Project created: just a test program so far
LEDs, PWM Switch Control, UART basically working.
2023-01-02 00:00:00 +01:00