Hi,
I am using s140 v7.0.1 for nRF52840.
I found if I configure NRF_GPIOTE->CONFIG[0], then BLE will not work.
Which GPIOTE channels are used in s140?
Thank you.
Hi,
I am using s140 v7.0.1 for nRF52840.
I found if I configure NRF_GPIOTE->CONFIG[0], then BLE will not work.
Which GPIOTE channels are used in s140?
Thank you.
Hi,
The softdevice does not use any GPIOTE channels.
Best regards,
Jørgen
I am using NUS in my firmware.
When the code that writes value to NRF_GPIOTE->CONFIG[0] is used, I can use nRF UART for Android app to pair with my board, also I can send from app to my board, but my board doesn't send bytes to app when it is trying.
If this NRF_GPIOTE->CONFIG[0] code is commented, BLE Tx works fine.
I am home now, so I cannot remember clearly, but the code is similar to following code block, I referred it from here.
NRF_GPIOTE->CONFIG[0] = GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos |
GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos |
pinselect << GPIOTE_CONFIG_PSEL_Pos |
GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos;
I found "allocating the channels 0-2 for pwm and 3 for PA/LNA in BLE radio" in this link, so I guessed softdevice uses GPIOTE channel 0-3, maybe I misunderstood the context.
In the coming Monday, I should check the error returned from ble_nus_string_send().
If you have any suggestion, please tell me.
Thank you.
That issue is about the radio driver in Zephyr, it is not related to the softdevice. If you are using nRF5 SDK (which I assume you are, since you are using s140 softdevice), that is not relevant.
Which pin are you configuring for use with GPIOTE?
Yes, I am using nRF5 SDK. But sometimes I directly use registers.
The pin is P0.08.
After I changed the channel from 0 to 4, BLE Tx worked. So I believed the comment in Zephyr link.
I should see if I used channel 0 in other part of my firmware.
Are you testing on nRF52840 DK? Are you transferring data from PC over UART to the BLE NUS application? GPIO P0.08 is used as UART RXD pin by default on the DK, maybe that could be the cause of your issue?