Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Topic started by: Clory on July 18, 2013, 12:02:28 am

Title: SOLVED: Trouble capturing SPI
Post by: Clory on July 18, 2013, 12:02:28 am
I am in the process of interfacing my MCU with an SPI device, SCLK is 8MHz. I have written some preliminary code just to get the initialized defaults from the device just to verify communication works and judging by the output I have gotten over a serial interface it does indeed work.

Communication with the device can begin after CSN goes low and after I'm done I bring it back high. From what I have read I think I understand how to at least set up simple parallel triggering. If I triggered on CSN high to low I would be able to capture all the data on the selected channel group up to the available storage. The reason I point that out is because I have a few transitions on CSN. After CSN goes high it should go low again somewhere in the 200ns range but I am not seeing it.

Could anyone provide some pointers as to what I am doing wrong?

SOLUTION
I started off by making sure I could at least capture a square wave from my micro and then started on the SPI code, slowly building it up till it broke.

The device I was interfacing with needed a few delays. Unfortunately during the pin setup the CSN pin (as well as others) glitched. The glitch just happened to resembled what I was looking for. The initial delay was so long that the capture storage had already been filled before the real trigger appeared. Enabling RLE was the solution.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00882035760session_write_close ( )...(null):0
20.00912167336ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00912168112Database_MySQL->query( ).../DatabaseHandler.php:119
40.05502306832Database_MySQL->error( ).../Db-mysql.class.php:273