Hi,
I spent quite a while figuring out why I couldn't get sleep and USB working on a project using a H743, and it turns out it's a known problem, described in this old thread: https://forum.chibios.org/viewtopic.php?f=16&t=1798
What happens specifically is that the current code uses BOARD_OTG2_USES ...
Search found 34 matches
- Tue May 05, 2026 3:11 am
- Forum: Bug Reports
- Topic: Issue with WFI and USB1/OTG1 on STM32H743
- Replies: 1
- Views: 222
- Fri Apr 28, 2023 3:57 pm
- Forum: Small Change Requests
- Topic: ADC5 support for STM32G4
- Replies: 1
- Views: 51545
ADC5 support for STM32G4
Hi,
I needed to use ADC5 for a project. Caveat: the project uses v20.3.2, where I know for sure it works. I ported my changes to master, and as far as I can tell only the newline style changes for the files affected, however I won't be able to port the project for testing for a long time (ideally ...
I needed to use ADC5 for a project. Caveat: the project uses v20.3.2, where I know for sure it works. I ported my changes to master, and as far as I can tell only the newline style changes for the files affected, however I won't be able to port the project for testing for a long time (ideally ...
- Mon Mar 01, 2021 4:17 am
- Forum: Bug Reports
- Topic: Stack issues with fast interrupts
- Replies: 12
- Views: 10493
Re: Stack issues with fast interrupts
This is what I ended up changing in ChibiOS:
--- a/os/common/ports/ARMCMx/chcore_v7m.h
+++ b/os/common/ports/ARMCMx/chcore_v7m.h
@@ -502,9 +502,18 @@ struct port_context {
* @brief Computes the thread working area global size.
* @note There is no need to perform alignments in this ...
--- a/os/common/ports/ARMCMx/chcore_v7m.h
+++ b/os/common/ports/ARMCMx/chcore_v7m.h
@@ -502,9 +502,18 @@ struct port_context {
* @brief Computes the thread working area global size.
* @note There is no need to perform alignments in this ...
- Sat Feb 27, 2021 10:08 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
Giovanni,
do you plan on adding an "official" example showing the proper way to use FatFS on the H7? I'm having a hard time getting it to work via MPU region settings.
Setting up the object is still a bit awkward, because it needs to be in a region with size a power of two, and aligned to its size ...
do you plan on adding an "official" example showing the proper way to use FatFS on the H7? I'm having a hard time getting it to work via MPU region settings.
Setting up the object is still a bit awkward, because it needs to be in a region with size a power of two, and aligned to its size ...
- Fri Feb 12, 2021 8:48 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
That also would need changes to ChibiOS. On STM32H7 SDMMC1 cannot do DMA from/to any of the memories that are currently supported for disabling caching (SRAM1+SRAM2, SRAM3).
Up to you to do what you think it's best, as I said before mine was just a suggestion on how to fix it. Thanks.
GB
Up to you to do what you think it's best, as I said before mine was just a suggestion on how to fix it. Thanks.
GB
- Fri Feb 12, 2021 8:05 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
Here's what I would do (also attached)
--- a/os/hal/ports/common/ARMCMx/cache.h
+++ b/os/hal/ports/common/ARMCMx/cache.h
@@ -84,6 +84,8 @@
#define cacheBufferInvalidate(saddr, n) { \
uint8_t *start = (uint8_t *)(saddr); \
uint8_t *end = start + (size_t)(n); \
+ chDbgCheck((((uint32_t ...
--- a/os/hal/ports/common/ARMCMx/cache.h
+++ b/os/hal/ports/common/ARMCMx/cache.h
@@ -84,6 +84,8 @@
#define cacheBufferInvalidate(saddr, n) { \
uint8_t *start = (uint8_t *)(saddr); \
uint8_t *end = start + (size_t)(n); \
+ chDbgCheck((((uint32_t ...
- Fri Feb 12, 2021 3:21 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
I'm not sure I see how that would work.
If the unaligned invalidate is done with interrupts disabled, you still have the case where after it completes the thread that invalidated is waiting on DMA to complete, so you could switch to another thread that then proceeds to read or write one of the ...
If the unaligned invalidate is done with interrupts disabled, you still have the case where after it completes the thread that invalidated is waiting on DMA to complete, so you could switch to another thread that then proceeds to read or write one of the ...
- Thu Feb 11, 2021 10:59 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
Thinking some more about it, this problem can potentially affect anything else that uses DMA. For example, if you allocate a small buffer for a SPI transfer that ends up on the same cache line as other global data used by other threads, you could have the same behavior you outlined.
So maybe the ...
So maybe the ...
- Thu Feb 11, 2021 10:40 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
Actually, I was experimenting a bit with things, and at least for our use the following seems to work well, requiring no changes in FatFS, and only requiring to add the (regular, aligned) flush/invalidate to fatfs_diskio.
Basically manually allocate a larger buffer, and incapsulate it into a method ...
Basically manually allocate a larger buffer, and incapsulate it into a method ...
- Thu Feb 11, 2021 10:10 pm
- Forum: Bug Reports
- Topic: FatFS interface on H7
- Replies: 19
- Views: 15415
Re: FatFS interface on H7
True. The extra stuff at the beginning of the buffer is safe in this specific case, but not in general. And even for this case the linker could put data accessed by other threads after the end of the buffer.
The ideal fix would be for FatFS itself to move the buffer to the beginning of struct FATFS ...
The ideal fix would be for FatFS itself to move the buffer to the beginning of struct FATFS ...