¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

NanoVNA firmvare, compiled by DiSlord #firmware with MiniSD support #firmware


 

Hi DtSlord,

Thank you very much for the new firmware with microSD support, fantastic !??? I have added the connector to my H-4 and flashed the firmware.

I have 2 questions? :

1 I tried to set the time by the new "time"command, but when I type "time 2020 05 24 13 30 00", I get back : "Too many arguments, max 4".??? I tried several formats but no success, could you please give me the correct format ?

2) I have one 8 GB microSD-HC card only , when I insert it and press the bandwitdth display on the NanoVNA-H4, I get the error message :?? "SD_Send Cmd err CMD0, 0xFF , 0x00000000" twice and "CardType 0".?? Does this mean that this card is not supported? ? It is empty and formatted in FAT32.? I have ordered another card :? "Sandisc 32 GB Ultra memorycard UHS-1 A1", ??? Will this one is will be Ok ?

In advance, thanks for your response.

Jos


 

Flash last fitmware from this post
/g/nanovna-users/message/13787
In it i fix some problems

Time command syntac is:
time y 2020
time m 5
time d 24
time h 13
time min 30
time sec 10
"SD_Send Cmd err CMD0, 0xFF , 0x00000000" twice and "CardType 0"
Card not detected or answer, try update firmware


 

Hi Jos
I think you might ask DiSlord if the SD card driver supports SDHC type cards or the older type.?
Larry


Sent from Rogers Yahoo Mail on Android

On Sun, 24 May 2020 at 9:28 am, Jos Stevens<jrs@...> wrote: Hi DtSlord,

Thank you very much for the new firmware with microSD support, fantastic
!??? I have added the connector to my H-4 and flashed the firmware.

I have 2 questions? :

1 I tried to set the time by the new "time"command, but when I type
"time 2020 05 24 13 30 00", I get back : "Too many arguments, max 4".???
I tried several formats but no success, could you please give me the
correct format ?

2) I have one 8 GB microSD-HC card only , when I insert it and press the
bandwitdth display on the NanoVNA-H4, I get the error message :??
"SD_Send Cmd err CMD0, 0xFF , 0x00000000" twice and "CardType 0".?? Does
this mean that this card is not supported? ? It is empty and formatted
in FAT32.? I have ordered another card :? "Sandisc 32 GB Ultra
memorycard UHS-1 A1", ??? Will this one is will be Ok ?

In advance, thanks for your response.

Jos


 

In my test i use
Samsung EVO Plus 128Gb HD XL
Samsung EVO Plus 32Gb SD HC
Kingston MicroSD HC1 16Gb

All worked, detected
128Gb flash not write (used exFat filesystem, not supported), but card answer and read sectors ok

All others card answer and work
My card powerup log on 1 screenshot
SD_SendCmd err CMD0, 0xFF, 0x00000000
CMD0 Ok
CMD8 Ok
CMD8 0xAA010000
CMD8 Ok, run ACMD41
ACMD41 99
ACMD41 0x0080FFC0
CardType 4
My card powerup log on 2 screenshot
CMD0 Ok
CMD8 Ok
CMD8 0xAA010000
CMD8 Ok, run ACMD41
ACMD41 99
ACMD41 0x0080FFC0
CardType 4
Try made several screenshots, possible card can`t powerup from first 2 commands


 

My test SD cards foto


 

Hi DiSlord and Larry,

Thanks for all info.

DiSlord,? I did flash the latest? 0.9.1 firmware initially, but to be sure and in case you updated the 0.9.1 release I loaded the one you gave me the link to and flasherd it, same result.?? When I have the memory card inserted in the NanoVNa and start "Terra Term" it immediately reports :

SD_SendCmd err CMD0, 0xFF, 0x00000000
?SD_SendCmd err CMD0, 0xFF, 0x00000000
CardType 0

And I also get a report from my system that a portable storage device has been connected to it.? So I'm afraid that , for some reason, my SD card that is marked MicroSD HC I (Capital i) 8 GB not is detected by your firmware. ? So I have to wait untill I receive the ordered new card and see what happens then. If it's not working either, I will buy one of your type of cards.

Larry, thanks for your suggestion.

Best regards
Jos


 

Excellent! Thanks again for all the hard work.



On Sun, 24 May 2020 at 10:27 AM, DiSlord<dislordlive@...> wrote: In my test i use
Samsung EVO Plus 128Gb HD XL
Samsung EVO Plus 32Gb SD HC
Kingston MicroSD HC1 16Gb

All worked, detected
128Gb flash not write (used exFat filesystem, not supported), but card answer and read sectors ok

All others card answer and work
My card powerup log on 1 screenshot
SD_SendCmd err CMD0, 0xFF, 0x00000000
CMD0 Ok
CMD8 Ok
CMD8 0xAA010000
CMD8 Ok, run ACMD41
ACMD41 99
ACMD41 0x0080FFC0
CardType 4
My card powerup log on 2 screenshot
CMD0 Ok
CMD8 Ok
CMD8 0xAA010000
CMD8 Ok, run ACMD41
ACMD41 99
ACMD41 0x0080FFC0
CardType 4
Try made several screenshots, possible card can`t powerup from first 2 commands


 

Try this variant of firmware vs you card
Now for card init used low speed SPI bus (~280kHz)

If not work, need try check Card slot pins, and card should be inserted as on foto
Used pins:
2 - SD_CS
3 - SPI_MOSI
4 - VDD
5 - SPI_SCLK
6 - GND
7 - SPI_MISO
And send logs
All read/write after init go on max speed (36MHz), possibly it to big, datasheet say max speed = 25MHz


 

Hello DiSlord, I installed a microSD card slot and tested that both 8GB and 32GB microSDHC cards can work normally, but I found an ancient 1GB microSD card that does not work.

The following is the information displayed by the terminal when using a 1GB microSD card.

CMD0 Ok
CMD8 Ok
CMD8 0xAA010000
CMD8 Ok, ACMD41 99
CMD58 CCR = 0x0080FF80
CardType 4
SD_SendCmd CMD17, 0x20, 0x0000003F
SD_SendCmd CMD17, 0x20, 0x0000003F


 

Yes possible old cards can`t work on high SPI speed like 36MHz

I try set 18MHz speed for work, this little slowdown write from 150kB/s to 140kB/s

Also, i found RTC clock (internal timer) run to fast, as i see in datacheet STM32F303 use internal 40kHz LSI, but ChibiOS use default 32kHz value settings

SD_SendCmd CMD17, 0x20, 0x0000003F
Its mean Card answer on CMD17 (read sector) Incorrect address specified
1 variant i`m not correct detect card type (old cards use another adress mode)
2 variant card not correct deocode adress (from bigger speed)

Try this variant vs slowdown SPI for SD card (to 18MHz) and fixed RTC clock (for set normal clock timer need run time command and set new time)
Also i add read/write speed log stat for test

On my cards result ~180-220kB/s for read and ~90-140kB/s for write.


 

It still doesn't work, SDHC card uses block as read/write unit and small capacity SD card uses byte as read/write unit, is there no driver for small capacity SD card?


 

Yes, but you card answer
CMD58 CCR = 0x0080FF80
Not set Card Capacity Status (CCS) bit

Need read datasheet


 

Found my error in card type detect

try this


 

On Mon, May 25, 2020 at 11:30 PM, DiSlord wrote:


Found my error in card type detect

try this
Thank you very much, it works now.


 

Thanks for made test (i don`t found old SD cards at home for check it)

As i see all SD card types work
SD cards work
SD HC cards work
SD XL cards should work if format to Fat32, but need test, possible i enable exFat support
Read/Write speed not big, but this limits of SD card SPI bus mode and processor.

In future i try
revert SPI speed slowdown to 36MHz
add save s1p and s2p data files as *.s1p or *.s2p (need read more about this format, it just text but possible variants)
I think this a good extend NanoVNA capabilities.


 

Hi DiSlord,

It's working now , see screenshot attached (after 2 port calibration).

This is shown in Tera Term :

?CMD0 Ok
?CMD8 Ok
?CMD8 0xAA010000
?CMD8 Ok, run ACMD41
?ACMD41 99
?ACMD41 0x0080FFC0
CardType 4
filename VNA_20200525_00983.bmp
open 0
close 0

Thanks again for you fantastic work.

Jos


 

Add support ExFAT filesystem and check work on my SD card
Samsung EVO Plus 128Gb HD XL
All worked, support ExFat need additional 4kB flash and can`t be suppoted on NanoVNA-H (if add card slot in it)
But on H4 stiil more flash space (only ~89kB + 64kB for calibration save used from 256kB)

On Samsung EVO Plus 128Gb HD XL read speed ~300kB/sec write ~190kB/s


 

DiSlord,

With this firmware I see :

?CMD0 Ok
?CMD8 Ok
?CMD8 0xAA010000
CMD8 Ok, ACMD41 99
?CMD58 OCR = 0x0080FFC0
CardType 12
filename VNA_20200525_04212.bmp
open 0
close 0
?Read? speed = 238139 Byte/s (count 10, time 215)
?Write speed = 155634 Byte/s (count 606, time 19936)

Regards,

Jos


Op 25-5-2020 om 17:30 schreef DiSlord:

Found my error in card type detect

try this


 

DiSlord,
With your comment below, do you mean that the non-ExFat version of your firmware that supports the SD cards should work on an H if I add an SD slot?
...Larry

On Monday, May 25, 2020, 12:28:12 p.m. GMT-4, DiSlord <dislordlive@...> wrote:

Add support ExFAT filesystem and check work on my SD card
Samsung EVO Plus 128Gb HD XL
All worked, support ExFat need additional 4kB flash and can`t be suppoted on NanoVNA-H (if add card slot in it)
But on H4 stiil more flash space (only ~89kB + 64kB for calibration save? used from 256kB)

On Samsung EVO Plus 128Gb HD XL read speed ~300kB/sec write ~190kB/s


 

No for H need compile its own firmware, it have about 14kB free flash. Only Fat32 and short filenames need ~10kB (but i don`t test this for H firmware)
Also H version not have SD slot on PCB board, need add it, but this difficult for me (for my test).