GithubHelp home page GithubHelp logo

Comments (2)

fenugrec avatar fenugrec commented on July 17, 2024

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.

brian-brt avatar brian-brt commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.