Commit Graph

129 Commits

Author SHA1 Message Date
a4ca0d30c3 Force the use of system's reset in openocd
Using the system's reset avoids the debug getting stuck when the chip
enters low power. Hopefully this works all the time
2024-08-04 20:14:34 +02:00
89c81b8c42 Integrate the RTC to the task module 2024-08-04 20:14:24 +02:00
24e412446d Implement bkp's rtc alarm configuration
Since the alarm must be set each time it is to be used, a separated
function is a better fit
2024-08-04 20:12:28 +02:00
7ab6622908 Rework exti module to use a simpler API
The "specific" lines configuration would not work due to index error in
the callback configuration. While fixing the error, simplifying the API
by moving the afio calls to the calling context seemed a cleaner way to
do things
2024-08-04 19:38:24 +02:00
ba9bc57a49 Add openocd configuration
The target's debug would sometime get stuck while in low-power, making
it difficult to resume communications, even after hardware resets. Some
peripherals were also kept running when halted. This config should fix
these issues
2024-08-04 15:52:24 +02:00
947df53ecb Add missing file documentation 2024-07-27 22:19:29 +02:00
80c027370b Document BKP module 2024-07-27 22:13:46 +02:00
b1d25561b4 Temporarily fix warning 2024-07-27 21:57:53 +02:00
507f1e6863 Move rtc control to new BKP module
RCC's BCDR register has been moved to the BKP module since it is part of
the backup circuit and thus also aboeys some restrictions access-wise
2024-07-27 20:11:51 +02:00
3e3d4d2bff Implement RTC module's basic functionnalities
FUnctions need a cleanup and some details need be ironned, like the
clock management since the whole backup domain must be reset to
configure them
2024-07-27 16:41:36 +02:00
b37eb1dd6e Add RTC configuration to RCC module 2024-07-27 14:17:58 +02:00
0b483c535b Ensure PWR is enabled before configuration 2024-07-27 14:15:55 +02:00
a02bcecaec Implement RTC module's registers 2024-07-16 22:21:05 +02:00
699569ec99 Add LSI configuration function to RCC 2024-07-16 21:50:01 +02:00
3e97d4fe7e Implement sleep modes 2024-07-14 19:17:20 +02:00
5c89df4324 Fix typo in PWR registers 2024-07-13 21:35:42 +02:00
1741d47546 Implement SCB module 2024-07-13 21:35:22 +02:00
97dad53621 Define SCB module's registers 2024-07-13 21:14:44 +02:00
9681755168 Define PWR module's registers 2024-07-13 13:19:17 +02:00
5e4d87474a Fix major reg bitfield issue
A while back, macros had to be put in place to avoid letting the
compiler directly use the bitfields. This was necessary because the
compiler used strb instruction which only write bytes. On the AHB bus,
byte writes are transformed into word writes by repeating the byte,
which caused mayhem in the registers. After a lot of research, turns out
the packed attribute stops the compiler from does optimal (word) writes
and isn't needed anyway. Removing them fixes the issue
2024-07-10 23:16:49 +02:00
d5c70a3a04 Document the task module 2024-07-10 21:54:23 +02:00
93b383be49 Add API to access task's system time 2024-07-09 22:07:35 +02:00
dd1756221d Fix typo in task macros 2024-07-09 21:46:15 +02:00
173e16eb2e Add back task features in a simplified way 2024-07-09 11:53:05 +02:00
b7951f2211 Simplify task module 2024-07-06 22:43:50 +02:00
7cb33f65a5 Create new delay module 2024-05-14 15:03:18 +02:00
c09d2cda67 Remove priority parameter from tasks
In the end, priorities are only usefull in preemptive systems. Here, it would
only garentee the execution order, which we don't care about most of the time
2024-05-14 14:53:51 +02:00
34fb4dac76 Make stk_read function usable
This function used to return the raw current value, but that exposes the
prescaling used internaly
2024-04-30 20:17:58 +02:00
432310a52d Implement task module
For now, most code is temporary to validate that the system can work as
envisionned. Optimisations and cleaning will be done shortly
2024-04-30 20:15:58 +02:00
7e69bfd89c Document systick module 2024-04-28 22:11:37 +02:00
ddd05da6eb Implement systick module 2024-04-28 22:04:10 +02:00
7ba9063d02 Define systick's registers 2024-04-28 19:43:37 +02:00
fb1c11132f Write first API macros 2024-04-28 19:14:28 +02:00
Steins7
cbe6409f69 Merge pull request 'rework' (#4) from rework into dev
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/4
2024-04-20 18:20:22 +00:00
Steins7
64e1a0c83d Merge pull request 'assert' (#3) from assert into rework
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/3
2024-04-20 13:47:12 +00:00
47a06a2a39 Add asserts in existing code 2024-04-20 15:45:51 +02:00
a20acf4031 Implement error header 2024-04-20 15:20:18 +02:00
Steins7
eb0ca60aa1 Merge pull request 'debug' (#2) from debug into rework
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/2
2024-04-20 11:15:31 +00:00
26f2b4d545 Document format module 2024-04-20 11:57:02 +02:00
12800818ce Document debug module 2024-04-20 11:44:56 +02:00
84deb788a0 Improve debug module architecture 2024-04-20 11:37:11 +02:00
254fec4f00 Disable zero padding for signed integers
zero padding is mostly used with unsiged integers, and is quite difficult to
properly implement for signed integers. Disbaling iti n that case seems like a
good compromise
2024-04-15 23:10:31 +02:00
0088322ee7 Fix warning 2024-04-15 23:10:19 +02:00
e477055e6e Implement right-justified padding 2024-04-15 22:56:49 +02:00
3bcb9c7df4 Add error handling 2024-04-15 17:17:23 +02:00
075d9e17a6 Changed internal functions to static 2024-04-15 17:17:05 +02:00
727aadaba9 Implement signed integer formating 2024-04-15 17:04:35 +02:00
3dc548332f Implement basic string formatting 2024-04-15 16:54:54 +02:00
0d5deffa58 Update debug service to use new dma_mbuf 2024-04-07 16:47:34 +02:00
Steins7
c26b1cd703 Merge pull request 'usart' (#1) from usart into rework
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/1
2024-04-06 21:05:00 +00:00