Comments (30)
Ive managed to make it work by compiling for the blue pill. Usb works and using UGS left it running about 2 hours and it didn't crash. Is there a diffrence in the code between the C8 and the RC?
from stm32f1xx.
Is there a diffrence in the code between the C8 and the RC?
No - not in the grblHAL code, and both uses the same clock tree configuration.
An issue with the board map? Which one did you use that failed?
The RC build versions sets a different MCU symbol that may change some of the STM library code so it could be due to that as well.
Did you make a new board map for the board? If so can you share it? IIRC somebody requested one earlier but I do not have a board available for testing.
from stm32f1xx.
This is the steps ive done
Import project
Add __HAL_RCC_GPIOD_CLK_ENABLE(); to main.c
Add my_machine.c to Src folder
Add my_machine_map.h to Inc folder
Uncomment BOARD_MY_MACHINE in my_machine.h
Add N_AXIS 4 to symbols
Add a missing }, on line 118 of driver.c
Build Release
everything is working but If i build Release F103RC i get Unknown USB Device (Device Descriptor Request Failed)
attached is the my_machine_map.h and my_machine.c
also the chip in this board its marked as STM32F103RCT6 but CubeIDE says its a fake and i belive its a GD32 chip as many boards ive seen on aliexpress have it
from stm32f1xx.
changing the #define FLASH_BANK1_END in stm32f103xe.h from 0x0807FFFFUL to 0x0803FFFFUL makes usb work.
from stm32f1xx.
How can i use a DRO with grblhal?
The board has connection only for UART5
from stm32f1xx.
Thanks for the map, I have added it as BOARD_MACH3_BOB and fixed the other bits as well. The flash size is not something I want to change though, looking for a variant with the correct properties and flash size is the way to go?
How can i use a DRO with grblhal?
The board has connection only for UART5
By duplicating the real-time report to UART5?
Either serial.c has to be modified for UART5 or UART5 support has to be added to the board code. If you want data in a specific format that has to be added to the board code as well.
from stm32f1xx.
This board has a fake chip and most likely doesnt have 256k of flash or its not a 103RCT6.
For the DRO the i wnted to duplicate the report so i could connect uart5 to a another mcu to process the report and display it to a HMI screen. The documentation says the keypad and DRO can be UART OR I2C but how do i set it to UART?
from stm32f1xx.
This board has a fake chip and most likely doesnt have 256k of flash or its not a 103RCT6.
Yes, the issue is how to handle that?
The documentation says the keypad and DRO can be UART OR I2C but how do i set it to UART?
#define KEYPAD_ENABLE 2
Line 39 in 3783f3b
This is for keypad input, for output MPG mode has to be added to the driver - code can likely be copied verbatim from the STM32F4xx driver. It is guarded by the MPG_MODE symbol.
FYI my F103 bluepill sadly let out the magic smoke so I do not currently have a board to verify any code changes myself.
from stm32f1xx.
This board has a fake chip and most likely doesnt have 256k of flash or its not a 103RCT6.
Yes, the issue is how to handle that?
The best way is to add a comment in my_machine.c saying if usb fails in the mach3 board to change the value in FLASH_BANK1_END to 0x0803FFFFUL.
For the uart ive tried to copy from STM32F4xx but cant make it work. I also tried to modify the code from SERIAL2_MOD in serial.c to use uart5 instead of usart3 but still cant get nothing out os uart5.
I going to try and solder wires in usart1 and 3 to see if they work.
from stm32f1xx.
i give up. cant get anything on any report out of uart1 or 5. ill just disable usb cdc and connect by uart to another mcu
from stm32f1xx.
Did you managed to get uart working.
I have a bluepill and i need uart and usb
from stm32f1xx.
No i tried coping the from the f4 but dindnt work. The code compiled without error nothing came out of uart is USB CDC is enabled
from stm32f1xx.
I have a bluepill and i need uart and usb
UART for what purpose? UART 1 and 3 have code support, UART1 only when USB is disabled as the code is now, UART 3 when SERIAL2_MOD is defined in my_machine.h. serial.c and driver.c should be updated to register the UARTs with the core for greater flexibility - but I am hesitant to do that myself as I cannot verify code changes due to having no boards to test with. The one I had let out its magic smoke.
Anyone willing to donate a board to me? Preferably a BSMCEO4U-PP Mach4 BOB with a F103RC MCU. I can then do the coding and testing. Be aware that the C8 variant (with 128K flash) is on its last legs for grblHAL support, there is very little memory left for both code and data. When memory capacity is exceeded I will tag the last usable version and leave it at that.
from stm32f1xx.
I need the usb to connect to pc and uart to connect to another device to read data and send commands. My understanding is that uart 1 or 3 is used instead of usb and i need both
from stm32f1xx.
I need the usb to connect to pc and uart to connect to another device to read data and send commands. My understanding is that uart 1 or 3 is used instead of usb and i need both
the bluepill probaly doenst have enough flash size to add code. just disable usb and use another bluepill programed for SerialPassthrough and you can have usb and uart.
Anyone willing to donate a board to me? Preferably a BSMCEO4U-PP Mach4 BOB with a F103RC MCU. I can then do the coding and testing.
i can donate
from stm32f1xx.
@terjeio i can donate a mach3 board. email me
from stm32f1xx.
@terjeio did you recived the board?
from stm32f1xx.
Yes, it came in the post yesterday.
from stm32f1xx.
@r3l4x-pt Bad luck - I managed to kill the MCU when I plugged in my USB <> UART breakout. But since I recently ordered a few genuine F103CBs that arrived yesterday I was able to test some of the code changes I have made with a Bluepill. Why I did not order some F103RCs at the same time I cannot explain, will do so and replace the processor so I will be able to debug F103 code again...
I have added UART5 code in serial.c that compiles, hopefully it works. If it does not then the first thing to change is the clock source to HAL_RCC_GetPCLK1Freq
.
I have also added support for MPG mode that allows switching between USB and UART inputs. This can also be enabled for Cx builds by adding a pin definition for the mpg mode input and enabling MPG_MODE in my_machine.h However, no board maps has been modified for that yet.
Note that I have changed pin mappings for the 10pin IDC header and changed mapping comments to match the board labeling. I have also corrected the CONTROL_INMODE as this was wrong - if shifting is to be used the pins has to be in the same order as the underlying data structure.
@tiago928 - It is possible to enable two UART ports at the same time for the Cx variants, but perhaps not when USB is enabled without tuning RAM use, either in the linker file or by reducing buffer sizes. Buffer sizes can be set in the project properties by adding the symbols and desired values.
I hope this helps.
from stm32f1xx.
I will test it later but i think i know why it didnt work. I dindt removed the resistor on uart5 as it was working without grblhal. Did you have to change the FLASH_BANK1_END to 0x0803FFFFUL to make USB working?
from stm32f1xx.
Did you have to change the FLASH_BANK1_END to 0x0803FFFFUL to make USB working?
No, I did not change this and I do not remember now if I tested USB as I wanted to get UART5 working - easier to debug via UART when normal debugging does not work. The first time I flashed the LED lit up though so it the code did start.
I am not 100% sure if the resistors will affect UART operation, but I think it is likely.
from stm32f1xx.
had to change the clock source to HAL_RCC_GetPCLK1Freq and UART5 is working fine without removing the resistors. one thing that happened was it was stuck in error 18 but after sending $14=1 its working fine.
from stm32f1xx.
I have commited a change to EEPROM emulation that hopefully fixes the USB issue with FLASH_BANK1_END, I have also added the board to the Web Builder.
Thanks for the board and time you have put into this - appreciated.
from stm32f1xx.
Hi, I was able to flash couple boards, however I realised it works with the ones that come with the external clock with 8Mhz, the ones that have a clock of 12Mhz, it says usb descriptor not recognised, I followed some comments in this trhread, but unable to get it working, would you recommend any additional step?
Thanks.
from stm32f1xx.
the ones that have a clock of 12Mhz, it says usb descriptor not recognised, I followed some comments in this trhread, but unable to get it working, would you recommend any additional step?
Try with RCC_PLL_MUL6
, USB needs a 48MHz clock:
Line 60 in 5cbbdd0
from stm32f1xx.
the ones that have a clock of 12Mhz, it says usb descriptor not recognised, I followed some comments in this trhread, but unable to get it working, would you recommend any additional step?
Try with
RCC_PLL_MUL6
, USB needs a 48MHz clock:Line 60 in 5cbbdd0
Thank you, I will try tomorrow, also in this part, its not needed to put the value of 12MHz?
STM32F1xx/Src/system_stm32f1xx.c
Line 96 in 5cbbdd0
#if !defined (HSE_VALUE)
#define HSE_VALUE 8000000U /*!< Default value of the External oscillator in Hz.
Thanks.
from stm32f1xx.
Thank you, I will try tomorrow, also in this part, its not needed to put the value of 12
Good question, I am not sure I use any calls in this driver where this is referenced. Adding the value to a new build configuration is the best way, an example:
from stm32f1xx.
Thank you, it worked like a charm, do you know how to edit the usb to make a custom name when it installs the virtual comm, thanks.
from stm32f1xx.
do you know how to edit the usb to make a custom name when it installs the virtual comm, thanks.
The name is defined here.
from stm32f1xx.
I'll add a 12 MHz crystal build option in the next commit.
from stm32f1xx.
Related Issues (20)
- Port restrictions for 5-axis? HOT 2
- STM32CubeIDE Build Project failed with 5 errors. HOT 2
- Creality 4.2.2 stm32f103ret6 support HOT 6
- safety door enabled but not stopping the program HOT 2
- machine suddenly stops while working HOT 2
- how to compiling stm32f103c8t6 HOT 2
- Questions about grblhal using timers for outputting pulses HOT 2
- Z probe wiring diagram for skr mini e3 v2 HOT 7
- Please, help check and suggest modifications CNC3040 map file. HOT 16
- no usb com port HOT 4
- USB is not working on stm32f103RCT6. HOT 4
- Motor Stepper buzzes using A4988 and drv 8825 HOT 4
- error:7 - A settings read failed. Auto-restoring affected settings to default values. HOT 7
- Build fails, not enough flash HOT 3
- MiniGerbil 2 board map HOT 1
- STM32F103RCT6 : bad linker file
- Y & Z TMC2209s not being properly init'ed on BTT SKR Mini E3 V2.0 HOT 5
- Can't use SWD on BTT SKR Mini E3 V2.0 HOT 4
- E-stop/alarm issue HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32f1xx.