I am using twr k70 kinetis board,
i tried to read spi1 registers using KDS 3.2(Embsys register viewer) nothing is coming in hex and bin column of viewer.
so i tried to read and write spi registers of kinetis k70 from bootloader and also uclinux ,but as soon as i do that hardware fault comes,
i have turned on debug prints
U-Boot 2010.03 (Jul 11 2017 - 17:26:56)
U-Boot code: 2000F000 -> 2000F000 BSS: -> A63DEFDB
CPU : Freescale Kinetis series (Cortex-M4)
Board: Freescale TWR-K70F120M rev 1
Bank #0: 70000000 128 MB
UNHANDLED EXCEPTION: HARD FAULT
R0 = 00016d50 R1 = 00000000
R2 = 01c9c380 R3 = 00000003
R12 = 00002000 LR = 0000f975
PC = 00010b1e PSR = 01000000
I am using following code to read SPI1 registers base address.
in uboot -->
printf(" val at spi 1 --> %x\n" ,*(p));
printf("addr ---> %p",p);
printf("val at addr ---> %x",*p);
i get "segv" (segmentation fault)
According to data sheet register at address 0x4002D000 is R/W (SPI1 base register)
How to access SPI1 registers from uboot or any other peripheral register,is there any enable value ???