SD card access problem

Discussion and questions about programming with Ultibo.
asjsmile
Posts: 8
Joined: Fri May 03, 2019 10:49 am

SD card access problem

Postby asjsmile » Sat May 04, 2019 4:51 am

hi all,

I have some issues when i try to access SD CARD in running mode.

the CPU is CM3L and it's running 4 cpu.
ultibo core version is 3.1.1

a thread in cpu0 is managing interface and console debug and others.
a thread in cpu1 is managing signal processing & frequency measureing by using external interrupt.
a thread in cpu2 is managing data acquisition.
a thread in cpu3 is managing to save data in SD card.

this system is running well before trying to access SD card to save some data.

before accessing SD card,
a thread in cpu1 is running steadily around 450us period
and the external interrupt also works well so i can get accurate frequency of the input signal.

whenever try to the access SD CARD in a thread in cpu2,
the thread of cpu1 works abnormally,
the thread of cup1's period is not steadily even there are cases exceeding 1ms period.

further more, the callback function of external interrupt also seems to be delayed,
i got very low frequency against input signal's

i have tested just creating a files in SD card without writing a data.
the result is the same.
So, i think there is something wrong just accessing in SD CARD.

except for failure symptoms in cpu1, there is no problem itself such as creating files, writing data into SD card in cpu2.

I don't know why and how to fix it.

further question, in hw side, the voltage of the clock pin in SD CARD is over 4V. is that right ?

Hope you help.
User avatar
Ultibo
Site Admin
Posts: 2206
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: SD card access problem

Postby Ultibo » Sun May 05, 2019 10:28 am

Hi asjsmile, welcome to Ultibo.

This is a complex question so we will need to find out some more details from you in order to try to reproduce your problem.

asjsmile wrote:hi all,

I have some issues when i try to access SD CARD in running mode.

the CPU is CM3L and it's running 4 cpu.

Do you happen to have any other Pi versions to compare your results with, such as a Pi3B or Pi3B+?

asjsmile wrote:a thread in cpu0 is managing interface and console debug and others.
a thread in cpu1 is managing signal processing & frequency measureing by using external interrupt.
a thread in cpu2 is managing data acquisition.
a thread in cpu3 is managing to save data in SD card.

Could you provide a bit more information about the tasks running on each CPU?

Are you using the Dedicated CPU model as shown in our examples or just creating a thread on each CPU?

What is the nature of the external interrupt for CPU1, is it a GPIO trigger, a timer or something else?

asjsmile wrote:this system is running well before trying to access SD card to save some data.

What are the characteristics of the data you are saving to the SD card, is it a large block in one write (how large) or is it many small writes at different times?

asjsmile wrote:further question, in hw side, the voltage of the clock pin in SD CARD is over 4V. is that right ?

We'll check the schematic to be sure but unless you have modified the circuit then the voltage level should normally be correct.

Any additional information you can provide will be helpful in determining where the problem lies.
Ultibo.org | Make something amazing
https://ultibo.org
asjsmile
Posts: 8
Joined: Fri May 03, 2019 10:49 am

Re: SD card access problem

Postby asjsmile » Tue May 07, 2019 8:13 am

Dear Ultibo team,

i have tested in various cases and i had similar failure case with this but it wasn't related with SD card access.
our team found out a fact that there was a mistake in HW design.
the input voltage was too high in GPIO Trigger pins.

after blocking GPIO Trigger, i have tested making files and writing data in CPU2,
but there was no problem in thread of CPU1.

Sorry, it's not SD card access problem.

thanks for your fast and kind support.

Best regards.
SJ
User avatar
Ultibo
Site Admin
Posts: 2206
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: SD card access problem

Postby Ultibo » Tue May 07, 2019 11:28 pm

No problem SJ, thanks for letting us know.
Ultibo.org | Make something amazing
https://ultibo.org

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests