The first flashing went fine, subsequent flashings fail with
Error in initializing ST-LINK device. Reason: No device found on
target.
On an STM32H745 NUCLEO board I have enabled the DEBUG interface and SWO pin by mistake. Is there a way to hard reset this board ?
The "flashing under reset" trick did not work. That is, holding the reset button pressed and immediately releasing it before STM32_Programmer does its thing through ST-Link. A bit of RTFM-ing sometimes helps:
If a deadlock is faced due to a mismatch between the HW
board setting and the FW setting (LDO/SMPS), the user can
recover the board by doing the following:
- Power off the board
- Connect CN11 ‘BT0’ pin (BOOT0) to VDD using a wire
- This changes the BOOT0 pin to 1 instead of 0 and thus the
device boot address is changed to boot address 1 making the
bootloader starting in System memory, instead of starting the
FW in the user Flash (FW that is setting a wrong LDO/SMPS
configuration)
- Power on the board and connect using
STM32CubeProgrammer
- Erase the user Flash
- Power off the board and remove the wire between BOOT0
and VDD
- The board is now recovered and can proceed normally.
Now I got to figure out why it goes deadlocked as soon as I flash my bin... commented some bits of code and rebuilt, sill does it.
LE: found the offending lines:
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
...
My SystemClock_Config function was all written for LDO power instead of SMPS
Related
If i want to use mpu6050 intterrupt to wake up stm32.
when i move my board,stm32 can wake up form stop mode.
i have realized the iic communication between stm32 and mpu6050.and stm32 can already enter stop mode.
I'm using the STM32L496 and attempting to use the CAN interface with the embedded bootloader. I know I can put it into the bootloader, I can see the bootloader mapped to memory zero-address. And I can see the HSI is checked and system clock set to 72MHz as it should. However, when I attempt to send the first CAN frame (which should kick off the CAN command loop), the device resets. If I have boot0 high, it will reset to the application, but if I hold it low it will reset to the bootloader again.
I have a 24MHz oscillator connected to the HSE pins. Why does the device reset when I send a CAN frame (any CAN frame)?
Using st7789 tearing pin interrupt for synchronization of lcd display. But getting interrupt at very high rate hence all other tasks are getting delayed. Help me in configuration of tearing pin interrupt at lower rate so other task will get MCU time and get executed.
Using stm32l4 with st7789 driver to drive TFT LCD display.
What I am trying to do is:
Programatically I want to switch on and off the USB power of the RPi B3+ or 4 models.
I know that I can put 0 in /sys/devices/platform/soc/3f980000.usb/buspower but seems like it does not work as expected.
Let me show you what all things I have tried:
Check 1:
Connect USB device (In my case, its camera) to the Rpi
Fire command "lsusb" In the list,
I get my camera listed properly
Check 2:
The camera is connected and lsusb is showing the device
sudo vi /sys/devices/platform/soc/3f980000.usb/buspower and put 0 in it and save the file
again lsusb
All the connected devices list is gone. Looks like its working
BUT:
When I put voltage meeter on the usb port(As showin in screenshot) , it shows same current flowing through the USB ports.
Refer attached screenshot below to understand this issue.
Looking for the solution if anyone knows.
i try to connect lcd with touch panel AR1100 to Raspberry pi3 with Android things. Android does not have driver for this touch, i found this solve:
create file:
/system/usr/idc/Vendor_04d8_Product_0c03.idc
and write:
# This is an example of an input device configuration file.
# It might be used to describe the characteristics of a built-in touch screen.
# The device is a external device.
device.internal = 0
# The device should behave as a touch screen device.
touch.deviceType = touchScreen
# The device uses the same orientation as the built-in display.
touch.orientationAware = 1
But after restart touch not working. What wrong??
How i can connect this touch to android things?
In your Android Things application (not on Android Things system level) you can add AR1100 touch support via Raspberry Pi UART by implementing AR1100 Data Protocol (pp. 14-15 of datasheet):
The host should be configured for 9600 BAUD, 8 data bits and 1 Stop
bit.
...
Touch reports always originate from the AR1100 and are
transmitted in response to touch detection. The format of the
touch report is mode-dependent. The measurement resolution for
touch coordinates is 10-bit. The measured values are shifted
(multiplied by 4) and reported in a 12-bit format. In the
reporting protocol, the Least Significant coordinate bits X1:X0
and Y1:Y0 will be zeros. The resulting full-scale range for reported
touch coordinates is 0 to 4095.
...
The ‘standard’, 5-byte touch report is formatted as in Table 4-2:
etc.
Android Things UART example you can find here.