Other Parts Discussed in Thread: SYSCONFIG
Tool/software: Linux
Good Day
I have a issue testing SPI from U-boot. I have scoured the forums for some sort of idea. Here is my issue
I have a design where I have to read some registers from an ADC connected to McSPI0 and McSPI1 buses (CS = 0)
I have read similar experiences but not 100% fixed
When using the
#define OMAP3_MCSPI1_BASE 0x48098000 // Base Address For McSPI0
Calling spi_claim_bus(); the U-boot enters and get stuck in "spi_reset()" function.
I did manage to change the
OMAP3_MCSPI1_BASE from 0x48098000 to 0x48098100
and at that point the "spi_reset()" execute correctly. (Did not test yet if the SPI actually works)
But I can "claim" the bus, "release" the bus and then "free" the "slave"
But then I have to access the next SPI bus McSPI2
#define OMAP3_MCSPI2_BASE 0x480A8000 // Base Address For McSPI1
Does not matter if I change the Base address to 0x480A8100 or not
This loop then cause the U-boot to fail and reboot!!!! ( and this is in the spi_reset())
Serial print of sequence :
//////////////////////////////////////////////////////////////////////////
//*****************************************************//
//** SPI Routine **//
//*****************************************************//
//** Check if AD7768 on SPI Bus 0 is present: Pass **//
//** Check if AD7768 on SPI Bus 1 is present:data abort
pc : [<fef75c3a>] lr : [<fef62e41>]
reloc pc : [<8081ec3a>] lr : [<8080be41>]
sp : fdf23050 ip : 00000000 fp : 00000017
r10: 8084cb50 r9 : fdf36ec0 r8 : fdf38930
r7 : 000f4240 r6 : fef98367 r5 : 00000001 r4 : fdf38930
r3 : 4809a000 r2 : 00000000 r1 : 00000000 r0 : fdf38930
Flags: nZcv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
/////////////////////////////////////////////////////////////////////////////////////////////////
1) Am I missing something obvious????
2) Has someone used the SPI in the u-boot for eeprom or other hardware and is there some sample code to refer to?
Thanks Guys...
BTW.. As standard the SPI operates correctly once the Main OS load..thus the SPI and devices are correctly.. Thus I am a bit baffled why the addresses and function dont work as in the ompa3_spi.c