rework #4

Merged
Steins7 merged 88 commits from rework into dev 2024-04-20 18:20:23 +00:00
Owner

Most features have been re-implemented, except maybe the timers.
This is enough to consider the features to come as new features, as opposed to reworks

Most features have been re-implemented, except maybe the timers. This is enough to consider the features to come as new features, as opposed to reworks
Steins7 added 88 commits 2024-04-20 18:20:12 +00:00
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
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
For now, flash configuration is hard-coded. This will fixed in future
commits
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
The functions are very simple and their number complicates the API more
than anything, so we better merge them
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
This code doesn't work quite right yet, must most of the control system is in
place
Unbuffered writes are working as intented. Buffering still needs work
For now, USART's writes are blocking. This should be left to the application to
decide
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
The application should be the one to decide if a write should be blocking or not
Control over most parameters is not needed since they cannot change for the
buffer to work as expected. Only the priority should be adjustable
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
Each buffer should use its own byte index since the value would otherwise be
overwritten when writing to other buffers
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
Byte index is now stored on 2 bytes. Macros have been made cleaner
For now, only basic traces are implemented. The rest will follow once a printf
function is implemented
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
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
Using tables reduces code size while also improving lisibility. That is a
win-win
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/1
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
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/2
Reviewed-on: https://git.steins7.ovh/Steins7/stm32f1xx_HBL/pulls/3
Steins7 merged commit cbe6409f69 into dev 2024-04-20 18:20:23 +00:00
Steins7 deleted branch rework 2024-04-20 18:20:23 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Steins7/stm32f1xx_HBL#4
No description provided.