eeeck
5a91a56e27
Fix spacing
2026-06-18 13:25:07 +02:00
eeeck
9f1e7ba267
Move debugger connection check to main
2026-06-18 13:24:33 +02:00
eeeck
9086bf3efb
Fix buffer overwrite while DMA is not completed
2026-06-18 13:08:11 +02:00
eeeck
3bf5a8cc19
Fix spacing
2026-06-18 13:05:54 +02:00
eeeck
b9c371ed58
Initialize semaphore with count of 1
2026-06-18 13:05:43 +02:00
eeeck
9d96b3d4f2
Start
2026-06-18 12:50:50 +02:00
eeeck
bb70e0675a
Accept for standard IDs and extended IDs
2026-06-18 09:11:25 +02:00
eeeck
11e50b05e4
Make debug print safer by checking if ST-Link debugger is connected
2026-06-18 09:10:00 +02:00
eeeck
e951eaef7c
Fix debug prints
2026-06-18 09:07:09 +02:00
eeeck
ce25cba61b
Fix typo
2026-06-18 09:06:07 +02:00
eeeck
691d5dc1ea
Fix baudrates
...
- They were wrongly calculated on 168MHz but APB1 bus is at 42 MHz (168
/ 4)
2026-06-18 08:49:52 +02:00
eeeck
052d3fc5c0
Enable CAN bus NVIC interrupts with higher priority
...
- This was blocking the CPU from vectoring to
HAL_CAN_RxFifo0MsgPendingCallback
2026-06-18 08:44:25 +02:00
eeeck
4967cd9b32
Add USART DMA in Normal mode from CubeMX
2026-06-18 08:29:21 +02:00
eeeck
7b30c3cedd
Fix declaration bug
2026-06-17 21:27:26 +02:00
eeeck
4afa6702fb
Return exact length
2026-06-17 20:33:38 +02:00
eeeck
907c0b170d
Move to PFP block in main.c and use more standard logic
2026-06-17 20:33:22 +02:00
eeeck
60849ebb78
Testing: SDIO stuff deactivated until implemented
...
- Goes into error handling
2026-06-17 20:32:36 +02:00
eeeck
aeb553994c
Update LED struct
2026-06-17 20:14:56 +02:00
eeeck
5e28758a5e
Use serial mode instad of JTAG
2026-06-17 20:09:45 +02:00
eeeck
9980dafb5c
Initialize JTAG hardware
...
- To debug with ST-Link
2026-06-17 18:27:55 +02:00
eeeck
17c500e39a
Add debug messages for UART
2026-06-17 18:11:46 +02:00
eeeck
91218e782e
Include main header
2026-06-17 18:05:45 +02:00
eeeck
63e3e81986
Fix spacing
2026-06-17 18:05:04 +02:00
eeeck
84ea393dd6
Implement ITM debug via ST-Link
...
- Enable Instrumentation Trace Macroblock
- Remove PB3 initialization conflict with ITM
- Add a bunch of debug prints
2026-06-17 18:04:48 +02:00
eeeck
d69cb0231b
Removing duplicate, again...
2026-06-17 08:41:19 +02:00
eeeck
6bcc977c65
Switch ISR semaphore release to normal semaphore release
2026-06-16 23:07:50 +02:00
eeeck
8ec62d9fcd
Fix typo in comment
2026-06-16 23:07:03 +02:00
eeeck
cbefb45099
Add externs
2026-06-16 23:06:54 +02:00
eeeck
f7581d49ce
Fix task priority with correct handles
2026-06-16 23:06:35 +02:00
eeeck
e123c0172f
Small variable name change
2026-06-16 22:39:30 +02:00
eeeck
cd0b412d74
Remove whitespace
2026-06-16 22:35:04 +02:00
eeeck
24e100cae6
Use better name for CAN listener task function
2026-06-16 22:34:55 +02:00
eeeck
7d5b3f9be2
Increase all queue sizes and double the UART queue
2026-06-16 22:29:00 +02:00
eeeck
c540ff7800
Remove dead code
2026-06-16 22:13:52 +02:00
eeeck
dfc116b2e9
Fix linker error by moving RTOS thread declaration to global scope
2026-06-16 22:12:40 +02:00
eeeck
59b0aca092
Refactor: implement data relay from vCANLoggerListen to xUARTQueue
...
- No RTOS event, just queue put and get: cleaner way to send data and
more clear separation of concerns
2026-06-16 22:09:49 +02:00
eeeck
5f11cf5213
Revert decision on moving CAN event flag outside ISR
...
- Would have caused destruction of the queue data itself
2026-06-16 21:34:43 +02:00
eeeck
74bf4bde77
Implement identical queue drain for CAN2 to that of CAN1
2026-06-16 21:29:32 +02:00
eeeck
3691918196
Non-blocking on CAN1 queue check
...
- Check queue instantly
- Use DMA to move tx_buffer to UART peripheral
- Use a semaphore to DMA is being done, to avoid moving to next loop
iteration and overwriting tx_buffer
- HAL_UART_TxCpltCallback will release semaphore when DMA done
2026-06-16 21:27:52 +02:00
eeeck
79f317cec5
Wait until CAN1 or CAN2 save anything to FIFO buffer
...
- Moving CAN event flag to vCANLoggerListen to avoid possible race
condition and to make ISR leaner
2026-06-16 21:06:32 +02:00
eeeck
da1c13fcb0
Fix comment blocks and function descriptions
2026-06-16 21:02:15 +02:00
eeeck
59274272d3
Remove not useful comment blocks
...
- Not really used by CubeMX so worth removing
2026-06-16 20:25:21 +02:00
eeeck
bc71cd7371
Add comment headers
2026-06-16 20:06:21 +02:00
eeeck
84980d2378
Implement hex converter
...
- Avoids snprintf
- Can be read from minicom/screen, but it's also friendly for other MCU
- This single function was AI generated
2026-06-16 19:55:44 +02:00
eeeck
8b1b3b7ff3
Implement safe UART semaphore release inside ISR
...
- It uses safe way to release semaphore
- Yields in case task interrupted was of lower priority: UART has
minimal latency
2026-06-16 19:49:13 +02:00
eeeck
0d0e485193
Initialize cansend headers
2026-06-16 19:34:12 +02:00
eeeck
ac5d9f6a72
Set CAN event flag and LED thread flag in ISR
...
- This is efficient specifically for
STM32F4x with Thumb-2 IT block
optimization enabled (-02 or -03)
2026-06-16 19:11:38 +02:00
eeeck
76628dec90
Initialize UART task and semaphore and CAN event flags
2026-06-16 19:10:53 +02:00
eeeck
f260dfe972
Use define instead of hardcoded value
2026-06-16 18:11:12 +02:00
eeeck
12ef44d3d8
Use clearer variable name
2026-06-16 18:06:26 +02:00