Closed jhonnyx161 closed 3 years ago
If you have enough memory, it should work on any CPU. Have you encountered a problem? What code have you tried?
Hello Play_all_sd_files.ino file does not recognize SPI.begin (int, int, int, int); does not recognize SD.begin (int); Try with SPI.begin (); SD.begin (); , compiles but st7789_nocs flashes does not show images
Features STM32F401 STM32F401CEU6 Core board V3.0 Switching 84Mhz ROM: 64KB RAM: 256KB
lcd st7789_nocs https://es.aliexpress.com/item/32950879136.html?spm=a2g0o.productlist.0.0.1138310bcIEShv&aem_p4p_detail=20210616064842844622267999950007436758
Arduino IDE compiler (stm32duino) https://github.com/stm32duino regards
I have all of that equipment - I'll give it a try and make any necessary changes to make it work.
It compiles file without modifying anything. It sounds like you're having issues with SPI not configured correctly. Have you probed the MOSI and CLK lines to see if you've told it the correct pin numbers? I know that the software works, so I can't help with your particular setup. Do you have an SD card connected to your STM32? Have you tested that it reads the file successfully? There are too many parts to fail for me to help you. Why not try the demo code which draws a GIF file from memory first? That eliminates one of the unknowns in your setup.
@jhonnyx161 you can eventually try this:
SPIClass *my_spi = new SPIClass(mosi, miso, sclk, ssel /* default= (uint8_t)NC */);
my_spi->begin( cs_pin );
// then later
SD.begin( sdcard_cs_pin, *my_spi );
extract a GIF file from memory works play_all_sd_files.ino does not work returns the following error
play_all_sd_files: 158: 51: error: no matching function for call to 'SPIClass :: begin (int, int, int, int)' 158 | SPI.begin (SCK_PIN, MISO_PIN, MOSI_PIN, SD_CS_PIN); | ^ In file included from C: \ Users \ jhonn \ OneDrive \ Documents \ ArduinoSTM32 \ AnimatedGIF-master \ AnimatedGIF-master \ examples \ play_all_sd_files \ play_all_sd_files.ino: 3: C: \ Users \ jhonn \ AppData \ Local \ Arduino15 \ packages \ STM32 \ hardware \ stm32 \ 1.9.0 \ libraries \ SPI \ src / SPI.h: 154: 10: note: candidate: 'void SPIClass :: begin ( uint8_t) ' 154 | void begin (uint8_t _pin = CS_PIN_CONTROLLED_BY_USER); | ^ ~~~~ C: \ Users \ jhonn \ AppData \ Local \ Arduino15 \ packages \ STM32 \ hardware \ stm32 \ 1.9.0 \ libraries \ SPI \ src / SPI.h: 154: 10: note: candidate expects 1 argument, 4 provided exit status 1 no matching function for call to 'SPIClass :: begin (int, int, int, int)'
There are multiple implementations of the SD library and I can't account for all of them in my example sketches. You'll have to solve this one yourself.
Hello
You can make it work for STM32F401 and ST7789_NOCS
regards