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
cf077d2e51
Fix unwanted changes
2024-04-06 23:02:08 +02:00
4eec301d17
Optimize USART driver's code size
...
Using tables reduces code size while also improving lisibility. That is a
win-win
2024-04-06 22:56:28 +02:00
c6da4e11d8
Document USART driver
2024-04-06 22:19:19 +02:00
85e7ad5ef1
Document DMA driver
2024-04-06 17:26:56 +02:00
a1ae904239
Document dma_cbuf service
2024-04-06 16:59:57 +02:00
5e961b15fc
Document dma_mbuf service
2024-04-06 16:57:36 +02:00
fd33003e26
Rework DMA buffer to work properly
...
DMA buffers now work reliably with USART. The DMA api has changed to make it
more efficient code-size-wise. This may, however, complicate things when
implementating powersaving features
2024-04-06 16:29:45 +02:00
7a19ae9223
Clean minor issues in startup.s
2024-04-06 16:28:08 +02:00
ccf36ac400
Simplify dma buffers and adjust usart
...
The dma buffer should be services that are used on top of peripherals. As such,
the usart driver should'nt directly use them, this is up to the user. The
multi-buffer has also been simplified since I was not satisfied with the
previous implementation
2024-04-03 22:03:15 +02:00
e1097048a6
RAM initialisation fixed in 086f915
2023-09-24 22:04:38 +02:00
b992e2b8fb
First implementation of debug service
...
For now, only basic traces are implemented. The rest will follow once a printf
function is implemented
2023-09-24 22:02:20 +02:00
cc54ca7ca8
Improve mbuf fix
...
Byte index is now stored on 2 bytes. Macros have been made cleaner
2023-09-24 21:59:29 +02:00
0628c4c07c
Use TC instead of TXE
...
Transfer Complete is preferable to TX Empty when using a DMA since we could be
polling the bit between transfers. TXE would be 1 but the DMA would be
transfering another at the same time. TC takes the DMA into account
2023-09-24 18:35:36 +02:00
dbfba20520
Temporary fix for mbuf's byte index
...
Each buffer should use its own byte index since the value would otherwise be
overwritten when writing to other buffers
2023-09-24 18:33:20 +02:00
a7099d5dfd
Rename drivers folder to drv
2023-09-21 20:42:16 +02:00
086f9155f7
Fix RAM initialisation
...
The reset handler is responsible for loading the variables default values. This
includes variables initialized to 0, although they are handed through bss and
not data
2023-09-18 11:45:12 +02:00
4464156981
Move DMA config to buffers
...
Control over most parameters is not needed since they cannot change for the
buffer to work as expected. Only the priority should be adjustable
2023-09-17 17:52:14 +02:00
d84d9cef83
Move DMA's rx buffer to a separate module
2023-09-17 17:36:24 +02:00
e2adf48f82
Document dma multibuffer module
2023-09-17 00:04:06 +02:00
256e3f30ab
Make USART writes non-blocking
...
The application should be the one to decide if a write should be blocking or not
2023-09-16 23:50:13 +02:00
7a660c29d2
Implement and validate all USARTs
2023-09-16 23:40:36 +02:00
dac751e466
Move DMA's tx buffer to a separate module
2023-09-16 18:53:50 +02:00
9f2b337abf
Add additionnal param to DMA callbacks
...
This parameter is necessary for DMA tools to be implemented with minimal flash
usage as it allow the use of a single callback function for all purposes instead
of the need to add separate callback functions
2023-09-16 18:15:44 +02:00
b9285f2ab9
Document USART's private functions
2023-09-16 17:38:13 +02:00
fdc5f381f8
Got USART's TX via DMA working as intended
...
For now, USART's writes are blocking. This should be left to the application to
decide
2023-09-16 17:15:49 +02:00
a66e5733e1
First try at implementing USART's TX
...
Unbuffered writes are working as intented. Buffering still needs work
2023-09-13 21:57:13 +02:00
6269cf969a
Add critical section functions for DMAs
2023-09-13 21:56:30 +02:00
f89fe12298
Add circular rx buffer management
2023-07-11 11:44:54 +02:00
46776ebfd3
Configure usart's rx with dma
2023-07-10 11:30:51 +02:00
c571343de1
Fix usart's regs typo
2023-07-10 11:29:43 +02:00
43cdb55c48
Cleanup dma's configuration code
2023-07-10 11:29:07 +02:00
12c0b16b39
Cosmetic fixes
2023-07-10 11:14:46 +02:00
45452ce49e
Implement dma's basic functions
2023-07-10 11:13:36 +02:00
6ddc2266e1
Create dma's register map
2023-07-10 11:13:05 +02:00
dfccfd9591
Replace flash's bitfields with macros
2023-07-07 17:46:04 +02:00
ebe30a4a7a
Replace exti's bitfields with macros
2023-07-07 17:41:18 +02:00
26bb798b79
Add usart's read function
2023-07-05 23:05:03 +02:00
073be3f980
Fix macro parameter
2023-07-05 22:51:31 +02:00
c8040cf62f
Implement usart's basic function
...
This code doesn't work quite right yet, must most of the control system is in
place
2023-07-05 22:24:02 +02:00
9706979028
Apply new mask system to usart's regs
2023-07-05 22:23:53 +02:00
c1b3f0d073
Replace rcc's bitfields with macros
...
Bitfields can use byte acces, which the bus doesn't permit. When that happens,
the bus adds extra bytes to form a word, modifying fields that shouldn't be.
Bitfields can be kept for debug and read, but writes must be done though masks
2023-07-05 22:23:28 +02:00
aeba78cfcc
Create usart's register map
2023-05-18 13:49:53 +02:00
3b4536bea2
Upddate module documentation
2023-05-13 15:50:13 +02:00
db5180d3e7
Document afio function
2023-05-13 15:48:07 +02:00
245b9238e9
Finish exti's implementation
2023-05-13 15:42:59 +02:00
3906a79315
Implement afio's control functions
2023-05-13 15:42:38 +02:00
9052aac1b3
Create afio's register map
2023-05-13 15:42:11 +02:00
c7deded9b2
Implement exti's control functions
2023-05-13 14:17:32 +02:00
a99b4ad0de
Create exti's register map
2023-05-13 14:17:03 +02:00
8dc58b6747
Add peripheral-wide reset function for gpios
2023-05-13 13:27:51 +02:00
d9170ee902
Updated module documentation
2023-05-08 21:28:30 +02:00
f0da0cd05c
Fix gpio configuration mask not properly applied
2023-05-08 21:19:46 +02:00
0034dea774
Make gpio writes atomic
2023-05-08 21:03:52 +02:00
c44dc87f43
Implement gpio's control functions
2023-05-08 21:01:31 +02:00
2f40111dbb
Create gpio's register map
2023-05-08 20:53:30 +02:00
16fbf892ba
Fix bitwise negations using the boolean operator
2023-05-08 20:52:18 +02:00
1d8ccfdfca
Fix rcc enum
2023-05-07 19:28:01 +02:00
661f4a0ae5
Implement nvic's control functions
2023-04-27 21:12:05 +02:00
691b360eb1
Create nvic's register map
2023-04-27 21:12:00 +02:00
8ff2cabeab
Add cortex_m3 doc
2023-04-27 21:03:25 +02:00
c10ef4d2f1
Merge peripheral control functions
...
The functions are very simple and their number complicates the API more
than anything, so we better merge them
2023-03-31 23:32:43 +02:00
2d83ce9f05
Implement AHB peripherals control functions
2023-03-31 23:22:11 +02:00
2b689c4335
Cleanup repository
2023-03-31 14:18:48 +02:00
ca935a7650
Rework comments
...
Avoid repitions between comments and code. Additionnal usage information
can be added as header comment and additionnal technical information can
be added in the source file
2023-03-31 14:17:39 +02:00
a101f07009
Implement peripheral control functions
2023-03-31 14:04:36 +02:00
3a768d9190
Implement Flash configuration
2023-03-26 21:07:37 +02:00
7f7cb077dc
Create flash register map
2023-03-24 19:05:43 +01:00
dd6d5fbdd1
Implement RCC's clock configuration
...
For now, flash configuration is hard-coded. This will fixed in future
commits
2023-03-22 23:30:29 +01:00
50dc10b76e
Create RCC register map
2023-03-19 21:57:37 +01:00
c2aec8e9ed
Rewrite linker and startup files
...
The files previously used were from StmCubeMx and Mbed but they contain
a lots off things that we don't need, like a heap and a space for
special debug symbols
2023-03-13 11:45:37 +01:00
d1e73a55c6
Update .gitignore
2023-02-11 21:57:21 +01:00
4a12fa7a3d
Reorganize repository to be used as a library
...
Project was organized as an application, wich makes it less practical
to include in other projects. A template project may be added back to
make up for the missing files
2023-02-11 21:55:32 +01:00