SPI Reconfigure

Hello everyone,

I’m currently working to communicate an RTLS chip to the IMP001 via SPI. The problem that I’m having is that after configuring some of the RTLS chip registers using an initial SPI speed configuration, I should change the SPI speed to the maximum due to performance, but once I do that, even though it seems to work (I get to read and write registers), I no longer get the code to trigger the interrupt service routine that is configured initially.

My code looks like this:

`
// SPI bus and the CS pin
spi <- hardware.spi257;
cs <- hardware.pin8;
intpin <- hardware.pin9;

intpin.configure(DIGITAL_IN_PULLDOWN, dwt_isr);
// Configure the CS pin and set it high
cs.configure(DIGITAL_OUT);
cs.write(LOW);
imp.sleep(1);
cs.write(HIGH);
imp.sleep(2);
spi.configure(CLOCK_IDLE_LOW | MSB_FIRST, 1875); //3750-7500

/*After the initial register configuration, in a function declared previously in the code I do this, if I comment these lines, the interrupt service routine is called but in slow speed config */

spi.disable();
intpin.configure(DIGITAL_IN_PULLDOWN, dwt_isr);  //Initially tried without this line, but either way it doesn't work
imp.sleep(2);
spi.configure(CLOCK_IDLE_LOW | MSB_FIRST, 15000);          //RTLS chip supports up to 25MHz
imp.sleep(1);

`

Is there anything wrong with my pin configuration?

Thanks!

Have you checked the intpin state is actually changing when you think it is?

I don’t quite get what you’re doing with CS at the start - driving it low for a second then high for a couple of seconds? Are you correctly framing your reads/writes with CS?