Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:54 02 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Armmite - STM32H7: Developments

     Page 8 of 11    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 08:33am 27 Jul 2018
Copy link to clipboard 
Print this post

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

  Quote  or the Hc12 module with FU4 mode i need 1200 baud on serial. is this supportet?



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 States
Posts: 169
Posted: 03:14pm 27 Jul 2018
Copy link to clipboard 
Print this post

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 States
Posts: 169
Posted: 05:44pm 27 Jul 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 6266
Posted: 11:12pm 27 Jul 2018
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10180
Posted: 02:52pm 31 Jul 2018
Copy link to clipboard 
Print this post

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.

Edited by matherp 2018-08-02
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 169
Posted: 08:40pm 31 Jul 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 6266
Posted: 03:51am 01 Aug 2018
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10180
Posted: 07:14am 01 Aug 2018
Copy link to clipboard 
Print this post

  Quote  But where is the link to the download gone?




2018-08-01_171419_Armmite1.3.zip
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6266
Posted: 08:12am 01 Aug 2018
Copy link to clipboard 
Print this post

Thanks Peter,
I do have a problem
  Quote  ARMmite MMBasic Version 5.04.26
Copyright 2011-2018 Geoff Graham
Copyright 2016-2018 Peter Mather

> files
Error: A hard error occurred in the low level disk I/O layer
> option list
OPTION FLASHPAGES 1
OPTION SDCARD 114, 56
>


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: Australia
Posts: 6266
Posted: 08:29am 01 Aug 2018
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10180
Posted: 09:05am 01 Aug 2018
Copy link to clipboard 
Print this post

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)Edited by matherp 2018-08-02
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6266
Posted: 02:43am 02 Aug 2018
Copy link to clipboard 
Print this post

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.
  Quote  > files
R:/
18688 analogclock.bas
18432 ARLECSwitch.BAS
0 directories, 2 files
> files
Error: A hard error occurred in the low level disk I/O layer
> files
R:/
18688 analogclock.bas
18432 ARLECSwitch.BAS
0 directories, 2 files
>

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.Edited by TassyJim 2018-08-03
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 08:08am 02 Aug 2018
Copy link to clipboard 
Print this post

  Quote  When attempting to use the card with non present, an error is produced.


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 Kingdom
Posts: 10180
Posted: 08:52am 06 Aug 2018
Copy link to clipboard 
Print this post

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.Edited by matherp 2018-08-07
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 145
Posted: 08:05pm 09 Aug 2018
Copy link to clipboard 
Print this post

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.Edited by TrevorH 2018-08-11
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 06:58am 10 Aug 2018
Copy link to clipboard 
Print this post

  Quote  1 is SD card not present on ILI9341 display,


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.

  Quote  SD card on
both SSD1963 display work OK BUT instead of loadimage doing so it displays a patch
of garbage.


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?

  Quote  Just tried touch, works 100% fine on ILI9431, but still giving same errors as before on SSD1963 displays.


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




Edited by matherp 2018-08-11
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 145
Posted: 08:16am 10 Aug 2018
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10180
Posted: 08:26am 10 Aug 2018
Copy link to clipboard 
Print this post

  Quote  LoadImage gives same result as other displays(looks like not decoding BMP properly)
will check all conns with scope!


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 Kingdom
Posts: 145
Posted: 09:07am 10 Aug 2018
Copy link to clipboard 
Print this post

I am getting confused, I have a 800x480 BMP picture and it looks like it's putting on screen as a 320x240 size in portrait mode (maybe the 320x240 is wrong but similar in size), which would screw up the formatting I guess.

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 Kingdom
Posts: 10180
Posted: 09:40am 10 Aug 2018
Copy link to clipboard 
Print this post

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?
 
     Page 8 of 11    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025