In my app on the nrf9160DK, I have the need for the 9160 to reset the 52840. I currently have it working with the following settings:
for 9160 prj.conf:
CONFIG_BOARD_NRF52840_GPIO_RESET=y
CONFIG_BOARD_NRF52840_GPIO_RESET_PIN=23
In my app on the nrf9160DK, I have the need for the 9160 to reset the 52840. I currently have it working with the following settings:
for 9160 prj.conf:
CONFIG_BOARD_NRF52840_GPIO_RESET=y
CONFIG_BOARD_NRF52840_GPIO_RESET_PIN=23
Hi Mike,
Could you check what is the status of the pin P0.24 of nRF52840? Default state is low if not set by nRF52840. In this state, it disconnects nRF9160 P0.23 from nRF52840 P1.02. P0.24 needs to be high to enable the connection between P0.23 on nRF9160 and P1.02 nRF52840.
If you want, you could use pin P0.24 on nRF9160 which is connected to pin P0.18 which is the default reset pin on nRF52840. The switch which enables the connection is controlled by P0.16 on nRF52840.
Regarding configuration options, you could try to remove second line in nrf52840 prj.conf and specify pin P0.24 in the second line of nRF9160 prj.conf.
Best regards,
Dejan
Hi Mike,
Could you check what is the status of the pin P0.24 of nRF52840? Default state is low if not set by nRF52840. In this state, it disconnects nRF9160 P0.23 from nRF52840 P1.02. P0.24 needs to be high to enable the connection between P0.23 on nRF9160 and P1.02 nRF52840.
If you want, you could use pin P0.24 on nRF9160 which is connected to pin P0.18 which is the default reset pin on nRF52840. The switch which enables the connection is controlled by P0.16 on nRF52840.
Regarding configuration options, you could try to remove second line in nrf52840 prj.conf and specify pin P0.24 in the second line of nRF9160 prj.conf.
Best regards,
Dejan
I think I want to use P0.18 to do the reset. That seems the most solid way to reset the chip and independent of the state of the running app, right?
I have been looking at the 9160DK user guide and found the table in section 5.7.1 that describes the routing. After reading it a few times I think I finally understand what's going on. I believe I need to add code to 52840 to set P0.16 output+high so that P0.24 goes to P0.18, and on 9160 the reset code needs to configure P0.24 as output and raise/lower/toggle/something when I want to reset 52840.
I am working on this at home with few tools beyond a volt meter. Is that sufficient to check the status of P0.24 and what would I look for?
Hi Mike,
miked531 said:I believe I need to add code to 52840 to set P0.16 output+high so that P0.24 goes to P0.18, and on 9160 the reset code needs to configure P0.24 as output and raise/lower/toggle/something when I want to reset 52840.
This is correct.
miked531 said:I am working on this at home with few tools beyond a volt meter. Is that sufficient to check the status of P0.24 and what would I look for?
For determining the status of the pin, the easiest would be to read the status of the GPIO register. You can read more about GPIO in chapter 6.4 of the product specification.
Best regards,
Dejan
I got the solution working, but I have one outstanding question. I keep nReset high and to reset I set it low for a few milliseconds, then back to high. This works to reset 52840, but can you point me to the docs that describe what I should be doing? I found https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.7.pdf but didn't find what I was looking for in there (though it was a quick look, so maybe missed it).
Hi,
There is a mention of Pin Reset in the documentation which says that pin reset is generated when the physical reset pin on the device is asserted, and this is what you do.
Best regards,
Dejan