![]() |
Forum Index : Microcontroller and PC projects : Armmite - STM32H7: Developments
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
I can confirm you need pullups (nominally 10K) on all data lines + CMD and CLK. This is part of the electrical specification for 4-bit parallel operation of SD cards Not at the moment - slowest is 2400. This is because the divider of the system clock is only 16-bits and the clock runs at 200MHz |
||||
gadgetjack Senior Member ![]() Joined: 15/07/2016 Location: United StatesPosts: 169 |
I tied the pullups on the board , both caps on power lines and still the same failure. I am using the waveshare board which now is a bit funky with extra parts. I am off to the store to get a different brand of card to try. Not sure what else to do. Also tied 3 different versions of software but all gave the same response. I might have a bad board? That would be bad as it took so long to get this one. Testers keep testing....it is still fun. |
||||
gadgetjack Senior Member ![]() Joined: 15/07/2016 Location: United StatesPosts: 169 |
Ok, progress. I tried a new brand of card and it shows what is on the card. Still seems a bit picky trying to save and reload. Will load the newest version and try again. Baby steps. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
My SDcard reading is also iffy so you are not alone. I have one card that works reliably and half a dozen of various specifications that don't work at all. I am using the waveshare module which already has 10k pullups on all data lines and I added the 2.2ohm/10uF filtering on the 3.3V supply. I also made a small adapter to use instead of flying leads. I have another brand module to try but so far no success. I will try with all pullups removed next. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
The STM SD card driver seems to be giving too many problems and performance isn't even that good so I have scrapped the 4-bit parallel approach and re-written the SPI version of the driver. In addition I've made some other performance improvements as reported here and updated to the latest 1.3 HAL library Version 5.04.26 The SDcard should now be wired as per a normal SPI device PF7 to SD_CLK PF8 to SD_MISO PF9 to SD_MOSI SD_CS can be wired to any available pin as can (optionally) SD_CD and SD_WR. Use the standard MM+ syntax for setting up the SDcard. OPTION SDCARD cs_pin [,cd_pin] [,wr_pin] The driver can detect card removal and replacement without needing SD_CD connected. It has been tested using the card socket on an ILI9341 display and is completely compatible with driving the display and touch over the same SPI channel. The original pins connecting the SDcard are now available for general use. Pin-98 = PC8 Pin-99 = PC9 Pin-111 = PC10 Pin-112 = PC11 Pin-113 = PC12 Pin-116 = PD2 Pin-87 = PG2 SPI speed is set to 19.2MHz which should be compatible with most cards but in the event there are still problems I'll add an additional speed parameter. |
||||
gadgetjack Senior Member ![]() Joined: 15/07/2016 Location: United StatesPosts: 169 |
That did it! Now it works perfectly. Gotta find a case for it now. Thank you for all your great work!!!! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
Sounds good and I have a pile of cards to test. But where is the link to the download gone? Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
![]() 2018-08-01_171419_Armmite1.3.zip |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
Thanks Peter, I do have a problem I tried with and without the CD pin connected. Same error with no card inserted Jim VK7JH MMedit |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
Another problem. My SSD1306 test program doesn't talk to the display. The program runs without any errors but no life on the display. Are there any changes to I2C in this latest build? Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
This should fix i2c. The change to the updated HAL library somehow changed the pinout 2018-08-01_190416_Armmite1.3.zip Please try the SD card using the slot on a ILI9341 or similar. There seems to be an issue with the Waveshare card when using SPI (works with pullup resistors removed) |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
I2C now working. I tried a different SDCard module and all cards except a Sandisk extreme worked OK I then tried an module without any pullups and the extreme card works. Very happy. One issue. When attempting to use the card with non present, an error is produced. Reinserting the card and it works again. Normally, I would not be reading the drive without a card present. Jim Edit. No pullup on the CD line! I will fit one and try again. No. that didn't help. VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
The error is correct just the message is a bit (OK a lot) obscure. Try this version 2018-08-02_180814_Armmite1.3.zip |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
Version 5.04.27 2018-08-06_234227_Armmite1.3.zip This has been tested with the new daughter board and all display and other peripheral support now seems solid. This release supports SDcards over SPI so the SDcard on the daughter board V1.0 is not supported and the SDcard slot on a display should be used instead or a separate SDcard module can be used but should not have pullups. |
||||
TrevorH Senior Member ![]() Joined: 06/04/2018 Location: United KingdomPosts: 145 |
Hi Peter, the backpack seems so far to work OK for me, my displays all use the LED-A pin to light the backlight, so strapped pin 37 on TFT connector to +3.3v. I have 2 tiny problems, 1 is SD card not present on ILI9341 display, 2 SD card on both SSD1963 display work OK BUT instead of loadimage doing so it displays a patch of garbage. Any ideas??? Still waiting for RTC batt holder to arrive. Still haven't tried touch yet. I am using 5.04.27 Just tried touch, works 100% fine on ILI9431, but still giving same errors as before on SSD1963 displays. Trevor. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
The 4-pin connector for the ILI9341 SDcard I/F is directly wired to the same pins on the SSD1963 so there is no difference as far as the H/W or S/W is concerned. Can't explain this - check soldering etc. Can't replicate. Check soldering of the morpho pins. I had an initial problem and found one unsoldered - there are so many of them it is easy to miss one. Does load image work OK on ILI9341? Same code so difficult to understand but try this version which slows Touch SPI speed a bit and see if it helps 2018-08-10_165734_Armmite1.3.zip |
||||
TrevorH Senior Member ![]() Joined: 06/04/2018 Location: United KingdomPosts: 145 |
Hi Peter, Just tried SD card again on ILI9431 and is now OK(maybe contact probs with SD socket?!). LoadImage gives same result as other displays(looks like not decoding BMP properly) will check all conns with scope! Trevor. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
Check the image(s) on a PC. I had an image with strange artifacts and couldn't find the problem and then put the card into a PC and they were there on that as well. Some corruption on the card. Also try different cards, The SDcard SPI is running as fast as I could get it while still being reliable. Tassyjim is getting even better results with fast cards but slow cards sometimes give issues even though directory list works. Let me know and if no joy I'll post another version with slower SDcard SPI |
||||
TrevorH Senior Member ![]() Joined: 06/04/2018 Location: United KingdomPosts: 145 |
I am getting confused, ![]() btw am using SanDisk Ultra 32GB class 10 (new) card and all pictures are perfect on PC, also worked perfectly on old setup before daughter board arrived. ![]() ps If I set tft to portrait mode, picture seems to be in landscape on screen???? Trevor. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
I would say you definitely have a short or a bad connection on one of the data pins. Probably 6 or 7. Try using the 8-bit driver and play with different colours to see if there is anything strange. Does text appear where you expect? |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |