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);
       }
       ...
    ]
    
Reply
  • 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);
       }
       ...
    ]
    
Children
Related