Kinetis Clicker SPI_0 Problem

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
Alessandro Fulignani
Posts: 101
Joined: 04 Nov 2016 13:09

Kinetis Clicker SPI_0 Problem

#1 Post by Alessandro Fulignani » 26 Nov 2019 17:44

Hi MikroE,

I'm testing the SPI_0 on port(PTC4 5 6 7 ) with yours kinetis clicker.

While i can see the TX data on the SPI, i'm not been able to find a way to read the RX buffer.

I realized a clean uB project where i've selected only the SPI library.

With the oscillscope i can read the TX transmission CLK and MISO/MOSI correctly, but nothing appear on "take"buffer nor the SPI0 rx buffer/s

I did the test on several Kinetis clicker board, but the result it's the same.

P.S.

If i skip the routine "SPI0_Init()" and i initialize directly the registers,the SPI work fine.

Do you have any suggestions?

Thank you,

Alex

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Kinetis Clicker SPI_0 Problem

#2 Post by jovana.medakovic » 28 Nov 2019 14:56

Hello,

Can you zip and send me a minimal project which demonstrates your problem?

Kind regards,
Jovana

Alessandro Fulignani
Posts: 101
Joined: 04 Nov 2016 13:09

Re: Kinetis Clicker SPI_0 Problem

#3 Post by Alessandro Fulignani » 29 Nov 2019 17:24

Hi Jovana,

Just create a new project and follow the library indications:

' read a word from the SPI bus

dim take, buffer as word

spi0_init()

take = SPI0_Read(buffer)


Thank you,

Alex

Alessandro Fulignani
Posts: 101
Joined: 04 Nov 2016 13:09

Re: Kinetis Clicker SPI_0 Problem

#4 Post by Alessandro Fulignani » 12 Dec 2019 11:48

HI Jovana,

Do you have any news?

Alex

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Kinetis Clicker SPI_0 Problem

#5 Post by jovana.medakovic » 17 Dec 2019 15:31

Hello,

I tested SPI0 (PTC5_6_7 ) on Kinetis clicker and it works fine.
I suggest you use SPI0_Init_Advanced function instead of SPI0_Init, because with SPI0_Init you need to use PTD1_3_2.

Kind regards,
Jovana

Post Reply

Return to “mikroBasic PRO for ARM General”