Comments (5)
Just a quick update if anyone encounters this problem. Increasing ChibiOS system tick frequency, as suggested by Pavel, fixed the issue and I'm no longer losing frames.
from kocherga.
Normally, you should fix this at the platform level. You could add an RX FIFO queue between your CAN driver and the library.
Here you can find an STM32F105-based bootloader (CM3 72 MHz, execution from flash) with ChibiOS which works without issues at 1 Mbps: https://github.com/Zubax/zubax_gnss/blob/3ed2388a7dbe0eae226293846b327309d414521e/bootloader/src/board/can.hpp
I am not familiar with your application, but I suppose the culprit might be right here:
/**
* Hardware FIFO is 3 frames deep; the shortest (worst case) frame duration with acceptance filters allowing only
* extended frames is:
* (1+11+1+1+18+1+2+4+0+15+1+1+1+7) = 64 bits = 64 microseconds @ 1 Mbps
*
* Multiply by the depth of the FIFO:
* 64 * 3 = 192 microseconds
*
* Therefore, we must read the driver not less frequently than every 192 microseconds, otherwise we might be
* losing frames due to RX overrun. Therefore we enforce that the system tick interval is less than that.
*/
static_assert((1000000 / CH_CFG_ST_FREQUENCY) < 180,
"Minimal delay must be lower in order for the libcanard STM32 driver to work properly");
from kocherga.
Thank you for the link with an example implementation, I think you should add that to the readme.
And yes, that indeed might have been the culprit. I will report if it has fixed the issue if I find time to revert my modifications and try again.
from kocherga.
I think it's well-covered in the README for the driver already: https://github.com/UAVCAN/libcanard/tree/master/drivers/stm32
Writing anything more specific would not be sufficiently generic, so I would rather not do that.
from kocherga.
I mean adding the https://github.com/Zubax/zubax_gnss/ link to this repository as an example implementation of a kocherga bootloader. Sorry for the confusion :)
EDIT: oh my bad, I thought it was based on this bootloader framework, but it's not. Nervermind.
from kocherga.
Related Issues (10)
- Add FindKocherga.cmake for convenience
- Retry timed out requests to support poorly characterized non-real-time networks HOT 1
- Document the DroneCAN NodeInfo status reporting
- Update the Cyphal/serial header format
- RP2040 Implementation Using RP2040 HOT 8
- Only begins update if command sent from file server HOT 1
- CI: do not use `yakut compile`
- How to embed AppInfo into ROM image HOT 3
- Migrate to GItHub Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kocherga.