Hi,
I have a position sensor chip from Allergo. I want to read two parameters from the Chip. Parameters 1 is Absolute Angle. Parameter 2 is a error register. We need to fetch values every 66us (interrupt).
Reading Parameter 1:
"code 1
#define SPIDATA1 (*(volatile uint32 *)0xFFF7F43CU)
#define SPIFLAG (*(volatile uint32 *)0xFFF7F410U)
#define SPIBUF (*(volatile uint32 *)0xFFF7F440U)
SPIDATA1=0x070E2000;
while((SPIFLAG & 0x00000100U) != 0x00000100U)
{
}
AbsoluteAngleVal= SPIBUF & 0xFFFU; If this alone is executed at 66us(interrupt), everything is working ok . The execution time is 2.6us.