DSPI on M52277EVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DSPI on M52277EVB

Jump to solution
3,114 Views
ianlovatt
Contributor III

Based on an an example PE project i'm trying to send some bytes over DSPI and as the input and output pins are tied read it in. I'm trying to use it like standard SPI and do not want to setup any queing through the DMA controller.

 

It seems like the DSPI module might not be being clocked as once data is written to the tx FIFO throught the PUSHR it does not clear nor does the tXCTR value increase. I've looked over the MCF52277 reference manual and can see the halt bit and module disable which i've set to start transfers and enable DSPI clocks respectively.

 

Is there any other enable settings i've missed? Does anything need setting on the crossbar switch or DMA module?

 

Any help would be greatly appreciated

 

cheers

ian

Labels (1)
0 Kudos
1 Solution
750 Views
ianlovatt
Contributor III
In case anyone else is new to this, you need to set the PAR_DSPI port which is described under the GPIO section in the ref manual. the Processor Expert doesn't set this when you add a DSPI bean.

View solution in original post

0 Kudos
5 Replies
751 Views
ianlovatt
Contributor III
In case anyone else is new to this, you need to set the PAR_DSPI port which is described under the GPIO section in the ref manual. the Processor Expert doesn't set this when you add a DSPI bean.
0 Kudos
750 Views
ProcessorExpert
Senior Contributor III

Hello,

 

I have not reproduced such behavior with missing initialization of PAR_DSPI register in Init_DPSI bean in CodeWarrior V7.1 and Processor Expert V1.02 but maybe I missed something. Could you please therefore specify what version of Code Warrior and Processor Expert are you using? Are you using Init_DSPI or SynchroMaster bean? Could you please post here a project demonstrating the problem?

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
750 Views
ianlovatt
Contributor III

Have you tried this with the 52277EVB? we're using CodeWarrior 7.1 build 14.

 

As i understand i have two options

new project for 52277 or 52277EVB as there are no example PE projects for 52277 or its EVB

 

Selecting 52277EVB new project and then opening PE I it says our PE (v4.8) doesn't support the 52277EVB target so i selected 52277 CPU bean. There's then conflicts between link files and cpu.c's __hardware_initialize.

 

If i select a new 52277 project and start PE I just get problems with the conflicts.

 

I'm new to CodeWarrior and couldn't find any useful help on resolving these conflicts so I thought i just needed the DSPI init func so just grabbed that and used it in a new 52277EVB project. However i now realise that the PAR regs are set elsewhere in the PE project so that's why it didn't seem to work.

 

PE would've been a great tool for someone in my situation, new to Coldfire architecture, never read any of the Reference Manual and needing to setup peripherals quickly. I have an understanding of how things should work from experience with HCS12 micro but found myself stranded when parts of the initialisation code that PE aims to hide from me were conflicting with the defaults from the original CW project. I guess an example PE 52277 project would've been nice :smileywink: ...as it is i've had to spend ages going through datasheets to find out exactly how to setup DSPI for comms with SD card.

cheers

ian

0 Kudos
750 Views
ProcessorExpert
Senior Contributor III

To avoid the problem with missing 52277EVB project in project wizard you have to install the latest version of Codewarrior V7.1. and the latest patch V7.1.2 for this version. The patch contains Processor Expert V1.04.
Both (CW and it´s patch) is possible to download here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-COLDFIRE&fpsp=1&tab=Design_Tools_T...

The difference between 52277 and 52277EVB project is only in the default setting of CPU bean.
In 52277 project - the default cpu bean setting corresponds to the beans documentation.
In 52277EVB project - the default cpu bean setting corresponds to the EVB board.

Regarding to the PAR registers - We found that it is very comfortable for the user that
PE generates the code that covers functionality of Pin assignment (PAR register), muxing etc.
automatically in dependence on pin selected in a bean. You can find this code in CPU.c file
in your project.

Please find attached Init_DSP example project and please extract it into the following directory

(after installing PE V1.04):
{CodeWarriorDirectory}\(CodeWarrior_Examples)\Processor_Expert_Examples\M52277EVB

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
750 Views
ianlovatt
Contributor III

thanks for pointing out the updates

0 Kudos