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

GPIO direction bit is not working

I have problem with both custom boards and DEV board.

From a certain time after GPIO direction bit seems not effecting the pins.

To get rid of software factor, I all erase the flash and attach debugger, change register from it.

PIN_CNF[n]->DIR = 1

OUT->PINn = 1

The pin is still low (Should be High).

PIN_CNF[n]->PULL = PullUp

Pin goes High.

OUT->PINn = 0;

Pin still High.

PIN_CNF[n]->DIR = 0

Pin still High.

PIN_CNF[n]->PULL = 0

Pin goes Low.

I assume direction switching isn't working.

I don't know what caused this, but I have done specific sequence to it.

1. Download and debugging with J-Link

2. Target->Erase All (SES)

3. Download same firmware again (Same one as 1)

  -> The pins which configured as output by firmware encounter the condition

I don't think erasing/programming with debugger or firmware can instantly damage GPIO pins.

But that's only I did to reproduce it.

I already did it to 3 custom boards and 1 Dev board.

Does any one know what actually happen to this ports and any chance to recover them?

I already tried "nrfjprog --recover", but doesn't help.

What was connected to the pins were:

PIN4: TWI_SCL (Pulled up with 10kohm)

PIN9: TWI_SDA (Pulled up with 10kohm)

PIN10: LED with 10kohm to VDD on custom borad (active low), Nothing connected on dev board.

SDK:v15.2.0

IDE: Segger Embedded Studio Mac

SoftDevice: s132

nRF52832 (MDBT42V-P512KV2 RayTac https://www.raytac.com/product/ins.php?index_id=65)

Debugger: J-Link Lite CoretexM

Parents Reply Children
No Data
Related