SPI master FREEDOM board with Processor Expert

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPI master FREEDOM board with Processor Expert

2,415件の閲覧回数
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,859件の閲覧回数
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,859件の閲覧回数
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,859件の閲覧回数
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 件の賞賛
返信