| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
| |
transfer size
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using OSPI in indirect mode via DMA and noticed that the transfer future would never resolve. It was forever busy-looping in `finish_dma()` on the `while !regs.sr().read().tcf() {}` line.
After some debugging we noticed that the the `TEF` flag is set. The data sheet says the following about this flag:
> The following errors set the TEF flag in OCTOSPI_SR and generates an interrupt if enabled (TEIE = 1 in OCTOSPI_CR):
> - in indirect or automatic status-polling mode, when a wrong address has been programmed in OCTOSPI_AR (according to the device size defined by DEVSIZE[4:0]).
> - in indirect mode, if the address plus the data length exceed the device size: TEF is set as soon as the access is triggered.
Indeed we were configuring our device size to 0 while specifying a non-zero address.
Detect this condition and return an error early - as soon as we configure the registers (which, according to the data sheet, should be enough to raise the flag)
Also document this behavior on the respective TransferConfig and Config fields.
Testing
-------
See https://github.com/goodhoko/spi-error-test/blob/main/src/main.rs
|
| | |
|
| | |
|
| |
|
|
| |
Ospi command
|
| | |
|
| |
|
|
|
|
|
| |
- Make DQSE / SIOO configurable
- Make write instruction configurable
- Fix bug where the address DTR was using the config for the instruction DTR instead of its own
- Configure DQS pin
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The naming convention is to prefix blocking functions with blocking. As
both command implementations are blocking the async for the ospi
implementation should also be dropped.
|
| |
|
|
| |
Signed-off-by: Haobo Gu <[email protected]>
|
| |
|
|
| |
Signed-off-by: Haobo Gu <[email protected]>
|
| |
|
|
| |
Signed-off-by: Haobo Gu <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add octospim to ospi
Signed-off-by: Haobo Gu <[email protected]>
* feat: make octospim behind feature gate
Signed-off-by: Haobo Gu <[email protected]>
* refactor: fix fmt issue
Signed-off-by: Haobo Gu <[email protected]>
* refactor: fix ci failure
Signed-off-by: Haobo Gu <[email protected]>
* feat: add octospim reg writing code
Signed-off-by: Haobo Gu <[email protected]>
* feat(octospi): enable rcc for octospim at the initialization
Signed-off-by: Haobo Gu <[email protected]>
* fix: add octospim feature gate
Signed-off-by: Haobo Gu <[email protected]>
* fix: fix cfg flag
Signed-off-by: Haobo Gu <[email protected]>
* fix: fix rcc register on stm32l4 and stm32u5
Signed-off-by: Haobo Gu <[email protected]>
* feat(ospi): support OCTOSPI2 in build.rs
Signed-off-by: Haobo Gu <[email protected]>
* feat(ospi): add OCTOSPI2 pin impls
Signed-off-by: HaoboGu <[email protected]>
* feat(ospi): support both ospi instances in stm32 OCTOSPIM
Signed-off-by: Haobo Gu <[email protected]>
---------
Signed-off-by: Haobo Gu <[email protected]>
Signed-off-by: HaoboGu <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Add empty checks/peripheral busy waits
|
| | |
|
| |
|
|
|
| |
Remove non hal traits
Fix function comments
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Make operations generic against valid data widths
|
| | |
|
| |
|
|
|
|
|
| |
Add transfer configuration
Update command configuration
Add peripheral width consideration
Add drop impl
|
| | |
|
| |
|
|
| |
memory
|
| |
|