SPI master FREEDOM board with Processor Expert

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI master FREEDOM board with Processor Expert

2,316 次查看
teddychin
Contributor II

good morning,

i have a problem with SPI master 0 on FREEDOM board

i used processor expert in order to generate an SPI MASTER (very simple, without SS, without MISO) in order to drive an OLED SSD1351 based.

Processor expert has been set tup as attached.

Regarding the code, i'm calling  :

 

LDD_TDeviceData *SPIOLEDPtr;

SPIOLEDPtr    = SPI_OLED_MASTER_Init((LDD_TUserData *)NULL);

and when i want to send an SPI DATA (only 8 bits) :

SPI_OLED_MASTER_SendBlock(SPIOLEDPtr,spi_data,1);

where

uint8_t spi_data[1]={0};

spi_data[0]=data;                   //data is for example the OLED COMMAND

When i'm looking with an OSCILLOSCOPE, SSCLK from SPI0 (mapped on PTC5 on the FREEDOM board) aren't toggling at all...

Do you have an idea please ? any experience on SPI master, please ?

PS : i tried to remap on SPI1 (PTD7=MOSI & PTD5=SCLK) and same behavior.

thank you

Best regards


标签 (1)
0 项奖励
回复
3 回复数

1,760 次查看
vfilip
NXP Employee
NXP Employee

Hello,

you have to enable interrupts or call "Main" method.

For future questions related to PEx please use corresponding forum: Processor Expert Software

best regards

Vojtech Filip

Processor Expert Support Team


0 项奖励
回复

1,760 次查看
teddychin
Contributor II

Hello

thank you. i'll try. when you are writing main method what doesn't it means for you ?

thank you

best regards

0 项奖励
回复

1,760 次查看
teddychin
Contributor II

Hello

it is resolved. By disabling interuption a asking for generation of main, and placing main after each sendblock, i can confirm that SPI master is working.

thank you for the hint

best regards

0 项奖励
回复