Comments (2)
Hi,
No, firmware doesn't support it and as far as I can tell the hardware can't really do this unless maybe by polling the error codes, detecting ACK errors and manually aborting transmission before it gets transmitted again automatically – ugly at best.
I thought maybe some test mode could provide similar behavior but there's no way of looping back the ACK signal yet still receiving frames from the bus.
I'll leave this open for a while in case someone has a better idea but I doubt it will be possible on this platform.
from candlelight_fw.
I took a look at the reference manual. I basically concur that it's impossible, but I noticed something else: I think CAN_CTRLMODE_LISTENONLY
is interpreted as CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_PRESUME_ACK
. @henzef maybe that behavior is close enough for what you want?
I don't think plain CAN_CTRLMODE_LISTENONLY
should receive messages with no ACK on the bus, but the "silent mode" of this hardware will. The reference manual says:
If the bxCAN has to send a dominant bit (ACK bit, overload flag, active error flag), the bit is rerouted internally so that the CAN Core monitors this dominant bit, although the CAN bus may remain in recessive state
I tested it too, and it definitely does receive non-ACKed frames. I'm not 100% certain on the "correct" correct semantics for plain CAN_CTRLMODE_LISTENONLY
though.
I think the gs_usb driver with this firmware should at a minimum accept CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_PRESUME_ACK
to give the current behavior. Refusing to come up with plain CAN_CTRLMODE_LISTENONLY
might be "more correct", but it's also a backwards incompatible change. I'm not sure if making that change purely in gs_usb or bringing it all the way to the microcontroller would make more sense.
In the end, I concur that looping back the ACK signal while doing normal transmits and receives on the bus is impossible with the test modes. You can do it along with normal transmits or receives on the bus though...
from candlelight_fw.
Related Issues (20)
- RFC: cmake-presets to select included toolchain file by default ?
- tweak `atexit` to get rid of malloc HOT 2
- RFC : empty fifos + hardware mailboxes when re-enabling CAN ? HOT 6
- startup.c is broken - hardfault with large BSS HOT 8
- While loops in USB ISR HOT 7
- Feature: add support for `GS_CAN_FEATURE_GET_STATE` and `GS_CAN_FEATURE_BERR_REPORTING` HOT 5
- build warning: "_close is not implemented and will always fail" HOT 2
- Canable device hangs after desktop application crash (= stop without disonnecting) HOT 25
- cansequence tool shows wrong telegram order HOT 19
- Clear internal data structures holding unsent frames HOT 1
- Openmoko firmware upgrade , no jumper to enter DFU mode or button HOT 21
- About candlelight and Cangaroo HOT 2
- version for stm32F042C4xx? HOT 7
- No Can Frames recieved after device reset without a power cycle. candleLight Firmware. HOT 7
- CandleLight FD at 8 Mbps HOT 3
- CPU_FAMILY STM32G0B1XK vs. CPU_FAMILY STM32G0B1XE (not comprehensible for rookies) HOT 4
- Potential firmware / driver issue HOT 21
- Problem building firmware for STM32G0B1 HOT 11
- Problem ACK on tx error HOT 1
- CANable-MKS problem HOT 1
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 candlelight_fw.