I'm using the S32DS3.4 sample "Port_Example_S32K342." I want to measure multiple SPI-specification sensors at the same time, so I want to control GPIO at high speed. I controlled the port output using an inline assembler, but the frequency was 2MHz. Please let me know if there are any conditions for faster control.
while (count++ < 4)
{
/* Get input level of channels */
__asm__ __volatile__ ("ldr r0, =0x40291302");
__asm__ __volatile__ ("ldr r1, =0x1");
__asm__ __volatile__ ("strb r1, [r0, #0]");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("ldr r1, =0x0");
__asm__ __volatile__ ("strb r1, [r0, #0]");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("ldr r1, =0x1");
__asm__ __volatile__ ("strb r1, [r0, #0]");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("nop");
__asm__ __volatile__ ("ldr r1, =0x0");
__asm__ __volatile__ ("strb r1, [r0, #0]");
TestDelay(1000000);
}