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

nRF24LE1 - Toggle problem

Hi,

we have developed a board that is using the nRF24LE1 chip. For test purposes I do want to toggle every possible pin. My first step is to develop this simple test code on my development board. But I have noticed some strange behaviour.

I am using the Starter Kit nRF6700 and the Development Kit nRF24LE1-F16Q32-DK. On the motherboard I connect PORT0 or PORT1 to the LED port. I simply want to toggle all pins of port P0 and P1, but they are not toggling as expected. When debugging the value of P0 switches between 0x7F and 0x00 and the value of P1 switches between 0x01 and 0x71. Although I am assigning 0x00 to P1, the value changes to 0x01.

On PORT0 only 7 of 8 pins are toggling and on PORT1 only 3 of 8 pins are toggling.

Can anyone explain this behaviour?

This is my test code:

#include "Nordic\reg24le1.h"
#include "hal_delay.h"

void main() {

	P0DIR = 0;  // set P0 as output
	P1DIR = 0;  // set P1 as output

	P0 = 0x00;  // set initial value of PORT0
	P1 = 0x00;  // set initial value of PORT1

	while(1) {
		P0 = ~P0;  // toogle all pins of PORT0
		P1 = ~P1;  // toggle all pins of PORT1
	
		delay_ms(1000);
	}
}
Parents Reply Children
No Data
Related