u-blox M8N doesn't save Baudrate and no fw update possible - module

yesterday I got my "Ublox M8N Module". I bought it at ebay.
I connected it with Arduino Uno as USB to Serial Bridge.
I can change Baud rate to 115'200, disconnect in Ucenter and connect with 115'200. If I unplug the module from USB, the config is lost. Baud rate is 9'600 again. If I try to Update from 2.01 to 3.01 it doesn't work.
Battery Voltage is at 2.5V and it finds lots of fixes just in seconds.
Do you have any idea whats going wrong? How can I find out, if its a fake and what I have to do to make a fw update.
Here is the log from the fw updater:
Starting Flash Firmware Update
Loading and checking firmware image
Load FW binary 'C:\Users\User\Documents\GPS\M8N Firmware\UBX_M8_301_SPG.911f2b77b649eb90f4be14ce56717b49.bin'
Binary check success, G80 image valid.
Version: 3.01 (107900)
FLASH Base: 0x800000
FW Base: 0x800000
FW Start: 0x86C16D
FW End: 0x8808CC
FW Size: 0x808D4
Transfer Packetsize: 512
Transfer Packets: 1029
Checking communication link...
Communication link OK.
Identifying receiver updater version at 9600 baud.
Firmware loader version 5.01 detected.
Suitable Multi-ROM image found
Check pass: u-blox8 Multi-ROM image -> u-blox8 ROM2.01-receiver
Identifying Flash
Flash Detection timed out.
Done in 10.1 sec.
Statistics:
Erases sent: 0
Writes sent: 0
Erase timeouts: 0
Write timeouts: 0
This is the module:
http://abload.de/image.php?img=img_20170319_122602ccum3.jpg
Here is a Screenshot from the messages box:
http://abload.de/image.php?img=screenshotqhuli.png

I got the same mudule fron China. It's fake.
It's a module with a rom, not a flashram.
They put a new sticker on the module.
So, it's not possible to change settings.

Related

Why is Black Magic Probe Uart loopback is not working?

When connecting a Black Magic Probe to my mac i'm not able to receive any data when connecting UART RX to UART TX. I tried updating the firmware to the latest version without success.
I tried multiple Black Magic probes, both on Mac and Windows without success. The UART TX led on the board blinks when transmitting. I verified the connection was to the correct device endpoint (second interface of the device). When using an oscilloscoop I did not see and data transmitted on the TX output port.
By default the Black Magic Probe does not power the target. The Black Magic Probe uses levels shifters that require a reference voltage provided by the target to be present. Without this reference level the levels shifter buffer will not output any signals or receive any signals.
It is possible to use the 3.3V LDO on the Black Magic Probe as a reference by using this command in GDB: "monitor tpwr enable". Use the command: "monitor tpwr" to validate the target is powered by the Black Magic Probe. Please be careful the target supports 3.3V power and the total power consumption is limited. By supplying the power to the target the level shifters have a reference level and a UART loopback should work by connecting the RX and TX pin.

Bootloader access over CANBUS on Nucleo-F446RE

I am trying to flash code over CANBUS on Nucleo-F446. I am referring this application notes
https://www.st.com/resource/en/application_note/cd00264321-can-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
So according to it in Boot mode the default baud rate of CAN is 125KBPS and we need to use PB5 and PB13 pin which are CAN2 pins.
For testing I tried to send CAN message with DLC=0 and STDID = 0x79 for which STM32 should return a ACK with same ID i.e. 0x79.
But I am not getting any response.
You must add a external clock to your Nucleo Board
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS Device) but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU bootloader execution after the selection phase.
STM Bootloader Description

Not able to program STM32 MCU using JTAG interface

MCU : STM32L496
JFlash version: v6.32i
We are facing the "Connection to target under reset failed" issue, when we try to program the board with STM32 MCU.
We were programming the board before with no issues. This error started appearing suddenly and now we are not able to program the board. When we scoped the reset pin of the MCU, the reset pin is going low when we click the connect button in the JFlash and clearly the board is resetting (We can see the firmware functionality restarting).
We tried the following:
Tied the BOOT0 pin to VDD and tried booting to the system memory and then tried programming. But this doesn't made any difference.
Tried always pulling down the reset pin to GND while trying to flash.
We have ensured that there are no issues with the track leading to the JTAG interface of the MCU.
Could you please help to resolve this situation?
Is there any possibility that the firmware currently running in the MCU could prevent the flashing and lock the device?
STM32L4 has a feature called Read-out Protection (RDP). See section 1.1 of AN4758. If your firmware application sets (intentionally or accidentally) the RDP level to 1 or 2 in the "option bytes" memory area then the SWD/JTAG port is disabled from accessing flash memory (read, write, and erase).
If the RDP is level 0 or 1 then you should be able to read the option byte memory area. If RDP is level 1 then you should be able to set it back to level 0. The flash memory will be erased when setting RDP back to level 0 but the SWD/JTAG port will get re-enabled. If the RDP level is 2 then I believe there is no way to reset it.
This is a common problem with STM32 SWD interface. For successful programming you should not power your custom board/ other hardware with the ST link power, instead you should make the GND connection common and supply from external source. And if you are using ST link only for programming and not for debugging then you should use the STM32 bootloader(easier).

stm32f3 'USER USB' not detected

I'm working on stm32f3 discovery board. For my current project I planned on coding a simple UART program on the board, I happened to read somewhere on the internet that to use the board for UART communication with PC the 'USER USB' has to be used.
My questions are the following
Firstly when i connect my board to PC using the 'USER USB'. The PC refuses to recognize the board.(F.Y.I- OS used is windows 7 64bit). This problem persists even after I update the driver! How to resolve this?
Is the "Connecting USER USB" part correct? because I can't see any RS232 chip on board
Should I use an add on board?
P.S I've installed all the necessary drivers from ST website and works flawlessly while using 'ST-Link interface' part of the board
I started working with the STM32F3 disco a few weeks ago. The user USB thing is a bit tricky.
To get it clear: The board has 2 USB ports.
One mostly for programming and debugging. It connected to a second ST chip which works as programming adapter.
The seconds (called USER USB) is connected to the STM32F303 chips you program
So what you can do is to configure your STM32 to implement a CDC over USB. With the windows driver installed (automatic or from ST, depends on OS version) you should get a virtual com port in your device manager. If you don't have the driver, you also get a device labeled as virtual com port but with a yellow exclamation mark.
So if I get you question right, this is what you're trying to do? Then yes, "Connecting USER USB" is correct. No, you don't need an extension board.
How to resolve that? It depends:
Do you already see the device in your device manager as communication device or serial interface or something? Then only the CDC driver from ST is missing.
Or do you get an "Unknown Device" in your device manager? That is what I experienced.
In STM32CubeMX you need to enable the USB device (Peripehrals->USB)
In STM32CubeMX you need to select the USB stack (MiddleWares->USB_DEVICE->Communication Device Class)
Generate the code. If you are using HSI as clock source CubeMX will generate a error message you can ignore for now. For a real product you should use an external clock.
Note that there is a bug in CubeMX version 4.20. The code generator generates code which may not work if you select HSE as clock input source. Even if you go back to HSI, the error remains.
Compile an run the code. You maybe need to reset the board removing BOTH USB plugs
Windows should detect the board now.
Extra problem: The board is ... well. Tricky. If you only plug in the USER USB to your PC, it should work but Windows may also inform you that you have an UNKNOWN DEVICE because enumeration has failed.
Remove the plug again. Now, first plug in the other, ST-LINK USB to power on the board. Wait 1-2 seconds. Now plug in the USER USB. There seems to be a startup problem. Only using the USER USB for power supply and CDC seems to run in a race condition between boot and USB and USB enumeration fails. First powering the board and then plugging in removes this race condition (at least at my board)
Now Windows should enumerate the device and offer you a virtual com port. Actually you should get two of them: One "ST... STLink Virtual COM Port" and one "ST... Virtual COM Port". The seconds one is the one you are looking for.
I hope that was the answer on the question you had.
Thanks for the post, had the same issue, here is what I added
Approach: Turn-off USB lines programmatically by changing input to output, forcing it to zero and reenable them after around 1 second
Also used power-off and on from ST USB Libs
// Force Re-Enumeration by the USB Host
//
int aux_retrigger_usb()
{
GPIO_InitTypeDef GPIO_InitStructure;
// ST USB Function
PowerOff();
// Program Pin 12 USB_DP from Input to Output
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
// Set USB_DP to 0
GPIOA->BRR |= GPIO_Pin_12 ;
// Wait for for minimum 32* 50msec , 1,6 secs
while(tim3_cnt%32!=0) ; while(tim3_cnt%32!=31) ;
// ST USB Functions
PowerOn();
USB_Init();
Virtual_Com_Port_Reset() ;
// Program Pin 12 USB_DP from Output to input
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
return 1 ;
}
So basically to avoid the power on race condition, the ports may be programmed
first to outputs and then released after 1 second.
I'm also struggling with the STM32F302. The USB is not recognized by the HUB Down stream port, and therefore does not appear in a device manager on PC(HUB's upstream port is connected to PC).
So, I made a deep search after I checked all the HW and SW.
It appears that 1.5Kohm resistor should be added on a DP, as F302 does not have the embedded one.
My design does not have neither, so hopefully, it will solve the issue tomorrow, so I have a hope for tonight)
You can read AN4879 by ST - the place I found these directions.

Omron Servo throwing error 0x84 while test running

Update and answer The mistake i've made is keeping the Servo on PIN 34 ON while trying to test run the servo on CX-Drive. after making Servo ON pin OFF and the problem Solved.
I'm using CP1H-XA PLC and Omron G series Servo. I've connected the servo from CX-Drive and initialized the drive and auto-tuned with load connected with low rigidity settings.It was smooth until I've encoutered an error. CX-Drive showing me an error
Drive1:An error occured while preparing Test Run. (0x84). Please check: communications speed; Servo is ready; Servo is not used by others; and Parameters Torque limit input setting and Drive prohibited are not changed from their default values.
I've changed Torque limit and drive prohibited values to 2:Forward use Pn5e and Reverse use Pn5f
Pn5E and Pn5F values are 300 and 100 respectively.
Servo is in Ready condition and Pin 34 of CN1 is On.
Servo is not being used by any other process, i'm pretty sure of that 'cause servo is in ready and not giving servo busy input.
Communication speed(baud rate) is set to 9600 and I've tested it with 2400 bps to 57600 bps but no luck.
Can anyone know why it is giving such an error? Please let me know if have solution for that.
For PC Communication I've connected R88A-CCG002P2 Omron original cable and for PLC communication I've connected with same cable but used 9 pin D-type female to male connector. Servo Model is R88D-GT04H. and using RS232 Communication and on PLC connected with CP1W-CIF01.