OPEN-SMART 3.2 and SD issue.. using MCUFRIEND_kbv , SD ,SPI Libraries

Hi friends…
i’m using an UNO and an OPEN-SMART 3.2 HX8352B, and the sd card reader mounted on the same breakout board.

using MCUFriend_kbv (GitHub - prenticedavid/MCUFRIEND_kbv: MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields)
and SD SPI arduino’s Libraries

graphictest and others example of the MCUFrined_kbv works very well.
SD reading example works, but showBMP_kbv_Uno can only read bmp data from SD and it can’t print the bmp on the screen.

the OPENSMART example showBMP_kbv_as7 works, but i prefer to use the MCUFRIEND_kbv Libraries.

if i use the attached skecth with uncomment:

//    bool good = SD.begin(SD_CS);
//    if (!good) {
//        Serial.print(F("cannot start SD"));
//        while (1);
//     }

the display fails and i can’t print anythings.

i can’t find the issue.
please someone can help me?

Thanks in advance to all.
Have a nice day


TEST_opensmart_kbv.ino (1.88 KB)

The OPEN-SMART shields use different pins to the regular MCUFRIEND shields.

On a Uno pins 11, 12, 13 are hardware SPI.
On a Mega2560 pins 11, 12, 13 are GPIO.

You will find that SD works on a MEGA2560 because the SPI pins are different (on the 3x2 header)
On a Uno the SPI pins on the 3x2 are shared with 11, 12, 13 that are used by the TFT.

You have never said which Arduino you are using.

If you are using TFT and SPI at the same time on a Uno, you need to use SPI.startTransaction() and SPI.endTransaction()

I have NO connection with Mcufriend or with Open-Smart.