GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 GMC500+, How do Flash erase from USB remote ctrl

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
Damien68 Posted - 08/24/2019 : 00:22:03
Hi,
I build my own application to downlod data from my GMC-500+.
This working fine even with 16/24/32bits data format, i tested it with a function generator conected on the tube cathode.
This working because i assume recording rate is 1 per minutes (CPM), this is what i need what i want.

But to complete my app i want to do auto-archive function to download and store data on PC hard drive.
To do this I need to erase flash after downloding his content.
How to do this?
What is the commande?

My app run on .NET windows framwork and compiled with free Visual studio community.

Bellow an overview of app, i can pan, zoom, translate curve with mouse wheel and shift CTRL keybord key or by mouse click and move.
I have also to add many statistic information (max avg min variance)

Certainly I would try to post the source code on GitHub when done.

Thanks in advence.



Image Insert:

74825 bytes
11   L A T E S T    R E P L I E S    (Newest First)
Damien68 Posted - 09/06/2019 : 13:00:15
I just see you use CH340 device for USB to serial bridge,
I'm senior hardware architect , Geiger is just a hobbit to me, I do not have any thoughts, I'm specialised on RF devices.
It would be better to connect the USB directly to the ST microcontroller, there is just to implement the USB CDC class (communications device class) from the Framework and manage 2 or 3 things.
I do it on Atmel device but not on ST but apparently the class is made.
You save a chip and have up to 480Mbit/s bandwith because there is no more physical port, useful to download the 1MB Flash. :-)
The device is then automatically recognized like a 'Com port' by windows10, Android and certainly linux (I didn't test it on Linux) certainly IOS too ...

it's just something I wanted to share.
Damien68 Posted - 09/04/2019 : 12:13:38
it effectively works very well by simply doing as you say
EmfDev Posted - 08/30/2019 : 08:51:53
You can just move the the pointer to the start. It will automatically erase the block if it's occupied. But won't erase later blocks yet. Anyway it's good that you figured it out!
Damien68 Posted - 08/29/2019 : 12:01:55
to have the most neutral operation possible, and least visible by user, I prefer to use the erase commands rather than the factory reset command.
now the operation is perfect, the <SetSPISA[XX][XX][XX]>> command does not return 0xAA but works well

To reset the flash after downloading it, I use the following sequence:
1. Erasing last 4096Byte bloc of the 1MB Flash
2. Move Flash pointer to the start of this erased Bloc with <SetSPISA[XX][XX][XX]>> command
3. Erase first bloc of Flash
4. Move Flash pointer to 0x000000
5. Send <CFGUPDATE >> command to force Timestamp and control Bloc writing on the Top of the Flash
6. Erase all other needed Flash Bloc including the last one used temporary

with this procedure, it's perfect, I have no more residues in the flash only have 0xFF

Thanks for your support EmfDev
EmfDev Posted - 08/29/2019 : 09:01:05
You didn't use factory reset? Can you try this command. <SetSPISA[XX][XX][XX]>>
where [XX] == address so all should be 0x00 (0).

You can also check the address by <GetSPISA>> to check how much of SPI is occupied.
Damien68 Posted - 08/29/2019 : 03:55:04
Hi EmfDev,
I can erase the Flash, it works well.
However, I have the following problem:
After erasing the Flash, the GMC-500 + continues to save its data to the old Flash current location address.
is there any way to control this pointer to reset it at the beginning of the memory after erasing the entire Flash?


Image Insert:

847684 bytes
EmfDev Posted - 08/27/2019 : 11:26:12
That's correct.
Damien68 Posted - 08/27/2019 : 10:55:26
Hi EmfDev,
Thank you for this complete information, I think it will allow me to finish my project.
There is one point that I would like to clarify,
I opened my GMC-500 +, the external flash placed is a Winbond W25Q16JV which is therefore 16Mbits or 2MBytes.
To avoid any confusion, we use only the first half of the memory?
EmfDev Posted - 08/27/2019 : 09:33:41
There is the <SPISE[][][]>> command to erase sector of the SPI. SPI is 1MB and 1 sector is 4k each.
And yes you can also use factory reset to erase the spi chip. But make sure to getthe CFG first then right it back after factory reset.
Damien68 Posted - 08/26/2019 : 23:43:40
Hi EmfDev,
I do not know how to erase completely the SPI Flash memory. Should I use one of the following commands?(FACTORYRESET or ECFG)?
==============================================================================
20. Reset unit to factory default
command: <FACTORYRESET>>
Return: 0xAA
==============================================================================
8. Erase all configuration data
Command: <ECFG>>
Return: 0xAA

I just have (USB) Serial command set named Communication Protocol - GQ-RFC1801
EmfDev Posted - 08/26/2019 : 09:36:21
Hi Damien, you can try to do this sequence but might now work.

-> Get the configuration file saved
-> Erase SPI chip
-> Write the configuration 1 by 1.
-> update cfg

GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.07 sec. Snitz's Forums 2000