GithubHelp home page GithubHelp logo

Comments (6)

n8tlarsen avatar n8tlarsen commented on June 2, 2024

Or am I confusing the definition of "exceptions" and "panics"? Is this instead related to #105?

from rtic.

korken89 avatar korken89 commented on June 2, 2024

Indeed, you are confusing exceptions and panics.

Exceptions are the exception interrupts in the Cortex-M core, and has nothing to do with panics. :)
The issue with exceptions and v6 is that source masking does not work atomically there, so the locking has a race-condition if we were to allow it.
Hence the error you are getting. :)

from rtic.

n8tlarsen avatar n8tlarsen commented on June 2, 2024

Thanks for getting back to me :)

  1. I know the lock used to set PRIMASK when using Armv6-M which is atomic; does it now mask individual interrupts using NVIC_ISER and NVIC_ICER?
  2. If the lock were to mask individual interrupts, I'm not following how the non-atomic read, modify, write of NVIC_ISER and NVIC_ICER would cause a data race, since preempting exceptions which modify the NVIC interrupt enable state should return the state when leaving its context.

from rtic.

n8tlarsen avatar n8tlarsen commented on June 2, 2024

Binding tasks to core exceptions, SysTick, HardFault, SVPend, SVCall, etc result in this error. Core exceptions are not maskable by the NVIC (which handles locking in Armv6m) so sharing data between an exception handler and another task causes the data race. Maybe this error message could be improved to specify something like "core exceptions" to point toward those exceptions which are handled directly by the CPU core, rather than the NVIC.

from rtic.

perlindgren avatar perlindgren commented on June 2, 2024

Once the under the hood docs are done, we could consider pointing the reader to the docs for an in depth explanation.

from rtic.

perlindgren avatar perlindgren commented on June 2, 2024

We close this for now awaiting documentation.

from rtic.

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.