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
f7581d49ce
Fix task priority with correct handles
2026-06-16 23:06:35 +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
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
0d0e485193
Initialize cansend headers
2026-06-16 19:34:12 +02:00
eeeck
76628dec90
Initialize UART task and semaphore and CAN event flags
2026-06-16 19:10:53 +02:00
eeeck
af4ce2f9e8
Remove unecessary MXCube comments
2026-06-16 18:01:54 +02:00
eeeck
34df5e51b7
Remove LED contexts
...
- Are now unnecessary with the move to task notification
2026-06-16 17:59:57 +02:00
eeeck
6446f5209b
Remove semaphores in favor of task notifications
...
- Less overhead, simpler to manage
- Semaphores are apparently overkill for a simple blink timer
2026-06-16 17:56:11 +02:00
eeeck
cc3a37ba4b
Increase UART baudrate
2026-06-16 16:16:51 +02:00
eeeck
990a85c002
Enable UART interface from MXCube
2026-06-16 16:01:49 +02:00
eeeck
2c14d095f7
Better way to avoid race condition, only notification lives in CAN task
...
- Runs only once
- Only critical notification is inside task
- CAN message during boot will not be lost, instead put inside FIFO0
2026-06-15 14:30:35 +02:00
eeeck
c1d2e65e20
Move to RTOS_THREADS
...
- ops...
2026-06-15 14:12:47 +02:00
eeeck
ce85e473b3
Move before starting scheduler to avoid race condition
...
- If a CAN message arrives during boot time ISR will fire and try to put
data into xCAN1RxQueue. At that time queue is NULL: calling RTOS APIs
on NULL handles will cause a HardFault
2026-06-15 14:11:11 +02:00
eeeck
ab8b68313b
Transition from timer based to task based LED signal
...
- Remove RTOS timers
- Create LED task
- Avoid polling, instead wait for semaphore
2026-06-15 14:06:51 +02:00
eeeck
ac212c4a0a
Merge pull request 'Change headers with better copyright comments' ( #13 )
...
from code-licensing into j1939
Reviewed-on: erickahmed/j1939_logger#13
2026-06-14 21:36:45 +02:00
eeeck
3c66a39a5d
Fix variable name mismatch
2026-06-14 21:27:10 +02:00
eeeck
19eefc288b
Fix scope error by moving declaration
2026-06-14 20:48:11 +02:00
eeeck
17febf569a
Use a more generic name as semaphore will be used by other tasks
2026-06-14 18:31:54 +02:00
eeeck
9d4d807cfb
Fix race condition that could cause a hard fault
2026-06-14 16:21:55 +02:00
eeeck
5ec806ffea
Add CMSIS include
2026-06-14 16:17:01 +02:00
eeeck
8777f742ac
Move typedef to header
2026-06-14 16:15:33 +02:00
eeeck
4aafa81009
Change CODE BEGIN N value
2026-06-14 16:14:20 +02:00
eeeck
ac16f8150e
Use a more sensible number of semaphores
2026-06-14 16:10:18 +02:00
eeeck
f0d2990b8d
Move below timer setup
2026-06-14 16:10:00 +02:00
eeeck
72ffb2644e
Use more clear variable names
2026-06-14 16:09:45 +02:00
eeeck
a75d42faeb
Create context structure for timer callback
...
Strucure is made of
- LED (port, pin)
- Semaphore
- Timer handle
2026-06-14 15:16:23 +02:00
eeeck
5f1695dc0d
Start timer once for automatic rearming with semaphore release
2026-06-14 14:51:46 +02:00
eeeck
7ece650f72
Move declaration on top
2026-06-14 14:49:54 +02:00
eeeck
7c7d774522
Create semaphores for signalling new message in FIFO buffer
2026-06-14 14:18:28 +02:00
eeeck
c65341c662
Change periodic timers to one shot timers
2026-06-14 14:18:07 +02:00
eeeck
dc3688d3d7
Change error check structure
2026-06-14 12:25:31 +02:00
eeeck
34553af0a7
Create message queues for saving CAN frames
2026-06-14 11:11:34 +02:00
eeeck
2cce753716
Remove duplicate declaration
2026-06-14 10:47:12 +02:00
eeeck
8e37c44eae
Refactor naming conventions following FREERTOS guidelines
2026-06-14 10:04:16 +02:00
eeeck
c101c77ba4
Refactor: move RTOS task definition back to main.c
...
- Private functions remain on canlog.c
- Better consistency for when regenerating with CubeMX
2026-06-14 00:36:41 +02:00
eeeck
0e4b41647f
Change headers with better copyright comments
...
- Add SPDX License Identifier and copyright notice
- Add NOTICE.md
Minor: remove unused freertos.c
2026-06-13 20:07:32 +02:00
eeeck
de7c817471
Reset LEDs in error handler
2026-06-10 14:27:39 +02:00
eeeck
59a58d1f1f
Implement LED heartbeat with RTOS timers instead of threads
...
- Less memory overhead (no stack allocation)
- Better timing accuracy (less jitter)
- CAN bus still has higher priority than timers
2026-06-10 14:14:17 +02:00
eeeck
0c3c93040b
Simplify CAN error code handler
2026-06-10 13:16:19 +02:00
eeeck
0b05331fff
Fix error handling for CAN bus
2026-06-10 13:01:43 +02:00
eeeck
6c4a1368be
Use more clear names for RTOS function prototypes
2026-06-10 11:28:42 +02:00
eeeck
87e8ffc6fa
Adapt error handler to log CAN errors and toggle error LED
2026-06-09 10:43:32 +02:00
eeeck
c891681b94
Minor comment clarifications
2026-06-09 09:51:10 +02:00
eeeck
770e97ccd9
Move include declaration to private includes
2026-06-09 09:50:00 +02:00
eeeck
5d3c8c0ec0
Refactor task function name
2026-06-09 09:12:11 +02:00
eeeck
495c9cb377
Enable auto wake up on CAN traffic for future sleep mode
2026-06-09 00:33:14 +02:00