
Hello everybody !
I'm trying to add asm code to teensy_pins.c in order to get an efficient port C interrupt, in VS2012 (I bought vsMicro)
Here is my code :
void portc_isr(void)
{
uint32_t isfr = PORTC_ISFR;
PORTC_ISFR = isfr;
__asm( "CLZ R2, isfr;" // store leading zeros in r2
"CMP R2, #19;" // Is there 19 leading zeros ?
"MOV EQ R3, 0x400FF08C;" // Move GPIOC_PTOR address to r3
"STREQ 0x100000, R3;" // toggle pin 13, Port C-5 => (1 << 5)
);
}
And I get the following errors (!!):
Compiling 'Interruption_pin12_led13' for 'Teensy 3.0'
cc7QmTvH.s* : : Assembler messages:
cc7QmTvH.s* : ARM register expected -- `clz R2,isfr'
cc7QmTvH.s* : ARM register expected -- `streq #0x100000,R3'
Could you help me please.
Thanks,
Joss.