This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

if (!nrfx_is_in_ram(buf)) causes Reset

I testing UART0 data transmossion. But, could resolve why CPU resets when executing : if (!nrfx_is_in_ram(buf)) in uart_nrfx_uarte.c file. See atached image, where Reset occurs.

Parents
  • Hi, 
    Can't answer your question, really, but had a peak and it seems the nrfx_is_in_ram is just an inline:

    return ((((uint32_t)p_object) & 0xE0000000u) == 0x20000000u);

    So just casting as an int and checking if the upper three bits are 010... I guess it could be simply accessing the buf from this interrupt is causing the crash (?) but the only other possibilities I can think of is that returning ENOTSUP here is deadly... which both seem pretty unlikely, since they do just that in the implementation from zephyr/drivers/serial/uart_nrfx_uarte.c in my build env.

    My first guess would be that the crash is actually happening elsewhere.  How did you determine that this is the source of the crash?  Anyway to debug, stop just before that point and see what's in buf?  And when you step over the next line, it dies?

Reply
  • Hi, 
    Can't answer your question, really, but had a peak and it seems the nrfx_is_in_ram is just an inline:

    return ((((uint32_t)p_object) & 0xE0000000u) == 0x20000000u);

    So just casting as an int and checking if the upper three bits are 010... I guess it could be simply accessing the buf from this interrupt is causing the crash (?) but the only other possibilities I can think of is that returning ENOTSUP here is deadly... which both seem pretty unlikely, since they do just that in the implementation from zephyr/drivers/serial/uart_nrfx_uarte.c in my build env.

    My first guess would be that the crash is actually happening elsewhere.  How did you determine that this is the source of the crash?  Anyway to debug, stop just before that point and see what's in buf?  And when you step over the next line, it dies?

Children
No Data
Related