Thanks Mark! Now it works with IRC48. I am pretty sure I didn't change that setting. For my understanding, what is the purpose of this setting?
Moving forward with my implementation, I am able to send and receive data to and from an FPGA through SPI. As a next step, I want to set an port type interrupt coming from the FPGA. I've started from the nRF24201.c code for the SPI setting and transmission. Now I am trying to reuse that code for setting the interrupt as well. However, as soon as I configure the interrupt, the system just doesn't work. No blinking led, no UART, no SPI. I guess it get stuck somewhere in the port initialization (a memory issue?).
As a note. I've observed this behavior with the original code as well (before I started implementing my changes). To make it works, I always had to comment the interrupt configuration.
Any idea on that?
This is my initialization code (exactly as in RF24201.c):
INTERRUPT_SETUP interrupt_setup; // interrupt configuration parameters
interrupt_setup.int_type = PORT_INTERRUPT; // identifier to configure port interrupt
interrupt_setup.int_handler = fn_nRF24L01_interrupt; // handling function
interrupt_setup.int_priority = nRF24L01P_IRQ_PRIORITY; // interrupt priority level
interrupt_setup.int_port = nRF24L01P_IRQ_PORT; // the port that the interrupt input is on
interrupt_setup.int_port_bits = nRF24L01P_IRQ; // the IRQ input connected
interrupt_setup.int_port_sense = (IRQ_FALLING_EDGE | PULLUP_ON); // interrupt is to be falling edge sensitive
fnConfigureInterrupt((void *)&interrupt_setup); // configure interrupt
Thank you,
Enrico