Component macro
filesd::initialise()
Don't step out on real hardware running.
Work flow
1.-Initialise screen
2 - initialise sd module
3- print: finish line code
Please check the complete hardware demo upload video:
https://youtu.be/gAGuB8S4pEk?si=rwANGc9KHbJED69H
Macro file sd/sdhc bug
-
- Posts: 11
- http://meble-kuchenne.info.pl
- Joined: Thu Aug 17, 2023 3:45 am
-
- Matrix Staff
- Posts: 1882
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 484 times
- Been thanked: 661 times
Re: Macro file sd/sdhc bug
Hello,
Please can you attach your project file.
Are you using an AVR based micro by any chance? The hardware spi can lock up on these if the ss pin is left floating or allowed to go low. It will need to be set to an output or tied to VCC with a pull up. If you can use it as your CS pin then that should solve the problem. Its a feature of AVR hardware.
Of course if you're not using an AVR then it's something else.
Please can you attach your project file.
Are you using an AVR based micro by any chance? The hardware spi can lock up on these if the ss pin is left floating or allowed to go low. It will need to be set to an output or tied to VCC with a pull up. If you can use it as your CS pin then that should solve the problem. Its a feature of AVR hardware.
Of course if you're not using an AVR then it's something else.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1882
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 484 times
- Been thanked: 661 times
Re: Macro file sd/sdhc bug
With no card present you should get a return of 255 but it shouldn't cause a lockup in the init macro.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Macro file sd/sdhc bug
Spi cs/ss is working well and correctly conected
Last edited by Mcolin on Mon Mar 18, 2024 8:59 am, edited 1 time in total.
Re: Macro file sd/sdhc bug
Initialise sd macro can't step out to continue the flow.
In the example:
1.- an output begins with 0
2.-then the component macro "sd initialise"
3.-and at the end output change to 1 to turn on a led
The led don't turn on, the initialise sd macro can't step out.
In the example:
1.- an output begins with 0
2.-then the component macro "sd initialise"
3.-and at the end output change to 1 to turn on a led
The led don't turn on, the initialise sd macro can't step out.
Re: Macro file sd/sdhc bug
If disable sd initialise macro
Led turns on so looks like sd macro initialise can't step out to work with sd module-
- Matrix Staff
- Posts: 1882
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 484 times
- Been thanked: 661 times
Re: Macro file sd/sdhc bug
Hello,
Please change the CS pin of the SD component to pin D10 / PORTB.2, this should solve the problem.
Please see my first post for an explaination.
Please change the CS pin of the SD component to pin D10 / PORTB.2, this should solve the problem.
Please see my first post for an explaination.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Macro file sd/sdhc bug
---> The CS pin of the SD component to pin D10 / PORTB.2 DON´T FIX THE PROBLEM
--> DEFAULT CLK PIN SETTINGS (CHANNEL 1) PORTB.5 DONT WORKS
THE PROBLEM WAS SOLVED IF:
CHANGE CLK PIN PORTB.5 ----> PORTB.0
--> DEFAULT CLK PIN SETTINGS (CHANNEL 1) PORTB.5 DONT WORKS
THE PROBLEM WAS SOLVED IF:
CHANGE CLK PIN PORTB.5 ----> PORTB.0