AnsweredAssumed Answered

I am having problems reading from the SPI1_MCR. I can write to it, but when I attempt to read from the register, I get a data abort exception.

Question asked by DuVall Egle on May 28, 2014
Latest reply on Jun 18, 2014 by DuVall Egle

I am working with the VF65GS10 Tower kit until our custom hardware is ready. While I wait, I was hoping to develop software that is intended to run on our custom board with a VF5 processor.


The custom board will use the SPI to communicate with a peripheral chip, so I am writing SPI based communications using the VF65GS10 Tower. I acquired some Freescale code online that works with the SPI bus, but when running the code, I get an data abort exception when the SPI1_MCR is read.


I am not sure why the write happens but not the read. And it is not just the SPI1_MCR that has that issue. When I attempt to read from the SPI1_SR, the same data abort exception happens.


I have used the U-Boot that comes with the Freescale MfgTool to access the registers as well (running on the A5 core). Using the U-Boot "md.l 0x4002D000" to read from the SPI1_MCR, I get the data abort exception, But when I write to the register using "mw.l 0x4002D000 0x00004001 1", there is no exception.


The code I have written is added as a command of U-Boot, so U-Boot is running at the time but I wouldn't think that would affect the SPI1_MCR read from happening.