-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSG:Warning: Settings write failed! #121
Comments
Additional info: after I sent $14=64 and got error, I opened ioSender and set all other settings. After that all settings was saved and preserved via power cycle. When I tried to change $14 via PuTTY I got error again. |
This issue only occurs on the F401 series chips and not on the F446. I have reported this issue to terjeio, but it seems that terjeio does not have an F401 circuit board, so they have not fixed it and only send error messages when writing fails. Unfortunately, I am not a programmer. The specific manifestation of this problem is that when the chip is powered on for the first time, if you only set one parameter, that parameter will not be saved after power-off. You must set another parameter, such as 384=1 or something, for the parameter to be saved. |
The first write (or rather erase) fails after power up if the MCU is programmed with the STM32 ST-Link Utility, when I program with STM32CudeIDE it does not - I have no idea why. Retrying the erase if it fails seems to fix the issue, I will commit an update later today with this workaround. For new board designs I strongly recommend adding at the minimum a footprint for an I2C EEPROM, even better to add one as well - best is FRAM. 2Kb minimum, 4Kb+ recommended as new features may require more capacity. This since there is no wear levelling implemented when storing to flash. |
NOTE: not yet used by any board map files. Workaround for issue #121, settings write failure. Improved frequency range for spindle PWM.
Since there no wear leveling, I prefer to have control of writing. Setting change command can be volatile and change value only in RAM, and another command can be issued to save settings($SAVE probably?) |
No, this will require users to be aware of and remember issuing the $SAVE command. This is a breaking change I am not willing to implement. Changes are buffered in RAM and written to permanent storage when the controller is in IDLE or ALARM mode and not in file run mode.
It might be possible to create a plugin that intercepts writeouts and implements a $SAVE command, this since the calls are indirected via function pointers. |
Wait, what? Every time when I press "zero" button in sender, grblHAL write it into NVM? It is unacceptable behavior in case flash used for store settings!
User doesn't need to remember anything. User uses sender. Sender have to do it. Like change all desired settings, then press "Write" button... wait, that exactly what I have to do if I want save settings using ioSender, isn't it? Beside, it needed only if flash used to store settings. EEPROM and FRAM can save settings immideatly. |
That is why I recommend using EEPROM or FRAM. AFAIK most flash tolerate in the region of 10000 - 100000 erase/write cycles before wearing out so it isn't a likely problem for hobby grade use...
Ok, I may consider adding it when all relevant senders has the $SAVE command implemented for flash storage that does not have wear levelling support. You can write up the spec and distribute to sender developers and come back to me with an estimate for when they are ready for this? |
Just gave me a list of senders specifically made for grblHAL and know about all additional settings and I will consider to do that 🙂 If you don't want to break anythyng by introducing any new functionality, it may be configurable with additional $ parameter and have existing behavior by default. |
Decided to give it a try, ordered MB85RC256V module, then found 24C256 module in electronic component pile, opened blackpill_map.h... and realized that there no I2C definitions. Web builder does not have EEPROM option available for this board either. |
Have you made a board already or are you wiring directly to a Blackpill? |
I didn't make PCB and I am not sure if I will. For now I use prototyping PCB to make a lathe controller. But my goal to make simple instruction how to recreate it, so it have to be implemented in Web Builder. At this point I ended with this pinout:
Is there any issues with such layout? If no, could you add attached blackpill_lathe_map.h to repo and Web Builder? Full disclosure: I didn't tried it. There may be some issues with GPIO_MAP or GPIO_SHIFT, may be those have to be replaced with GPIO_BITBANG. Update: Probe moved to B5, A Limit moved to B15 - group with other limits. Yes, I am perfectionist. |
I have added the map as Blackpill Alt. 2 with a number of additional options:
Note that I have not tested with the map. If you plan to add a website for your build then a link can be added to the board Homepage button in the Web Builder . |
Hi @terjeio, I have a request about Blackpill Alt. 2 configuration: is it possible to add the 5th axis? I missed two pins when I did this confuguration: PA13 and PA14. Those pins are used for debug/programming via SWO, however they can be used as GPIO. I would like to use PA13(SWDIO) as B Step and PA14(SWCLK) as B Dir. I am a trace PCB for the CNC controller and want to order boards this weekend. It is almost(there always a place for improvement 🙂) perfect, but last minute I realize that it would be nice to have the 5th axis... and there are two unused pins suitable for that. |
Yes, that is possible as it will be a non-breaking change. |
Hi @terjeio, I finally close to release my version of CNC breakout board(actually controller, since BlackPill will be included).
Please let me know if you have any questions or concerns. Thank you! |
The listed changes cannot be added to the current map file without breaking backwards compatability, so you will have to add a new one.
|
I made controller using WeAct Studio BlackPill F411. I build firmware using web builder with defaults except I enabled Spindle Sync. When I tried to enter command in console I got an error:
Build info:
NVS STORAGE:*FLASH - should be right... wait, let's try Nucleo-64 F401, it used to work. And it works. Build info:
The text was updated successfully, but these errors were encountered: