Hi all,
I'm moving from atmel uControllers, into ARM uControlers, so I'm relatively new with this architecture and way of code. I acquired a stellaris launchpad and started with some SPI experiments. So, my question is related with the following code:
1. GPIOPinWrite(GPIO_PORTB_BASE,GPIO_PIN_6,0x00);
2. SSIDataPut(SSI0_BASE, 0x00);
3. SSIDataGetNonBlocking(SSI0_BASE, &ulData1);
4. //ROM_SysCtlDelay(DELAY1);
5. GPIOPinWrite(GPIO_PORTB_BASE,GPIO_PIN_6,0x40);
The Pin 6 of the PORTB is used as a Chip Select pin, I don't want to use the chip selection of the SPI interface, I want to use the pin 6 signal. I put the pin at logic level 1 in the beginning of the code, and in the above line 1, I put it at 0 level. After that I acquire the SPI data, and put it back to 0. However, analyzing the signals in the oscilloscope it seems that the processor evaluates the lines 1. and 5. first and after that it sends the SPI data, as shown in the picture below. The yellow wave is the GPIO_PIN_6 and the blue line is the SPI clock.I want the yellow signal to go to one only after the SPI clock ends. I'm missing something about the uController behavior, I don't know what, but this look like pretty strange to me, can anyone please help with this.
I figure out a way to solve this, if I add the line 4. in the code with a proper delay, I can extend the GPIO_PIN_6 duration, but I still want to understand why the uController does not hold the Pin at 0 level during the SPI functions.
Thanks in advance
Cheers