This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USE NMI for GPIOTE

Hi,

I'm currently using an application that needs a very speed detection of GPIO and need to use NMI on GPIOTE.

I tryed to find how can I connect my NMI to GPIOTE but I didn't find how.

The only things I found is that the NMI is able to be connected to the "Memory Watch Unit (MWU)"

Is it possible de help be please to know I to do that.

Thanks

Parents
  • The NMI connection to MWU is a hardware design and we do not this feature for GPIOTE. If you want some specific condition in GPIOTE to trigger a NMI interrupt and if you have GPIOTE interrupt enabled you can do it like this

    main()
    {
       ...
        NVIC_SetPriority(NonMaskableInt_IRQn, some_priority)
        NVIC_EnableIRQ(NonMaskableInt_IRQn);
       ...
    }
    
    GPIOTE_irq_handler()
    {
       ...
       if(your_GPIOTE_event_happened or someother_condition_is_true)
       {
           NVIC_SetPendingIRQ(NonMaskableInt_IRQn);
       }
       ...
    ]
    
  • when configuring an interrupt, we first connect the IRQ to the handler by using
    "Hal_InstallInterruptVector(NonMaskableInt_IRQn , my_Handler)"

    I am not familiar with that code that links the interrupt to your handler. But all that is more application specific. I was telling you the things you can do on the lowest software level.

Reply Children
No Data
Related