I want to measure the current consumption of the uC on my STM32 Nucleo-64 evaluation board (NUCLEO-L073RZ). The manual says, that I just have to remove the JP6/IDD jumper and then connect the pins to an ammeter:
But if I just remove the JP6 jumper (no pin connection), the uC is still running (I can still debug/communicate via I2C). I would have expected, that if the JP6 is removed, the uC is no longer powered and therefore not accessible anymore...
Can somebody please explain me, where is my error in reasoning?
Here is the link to the corresponding STM32 Nucleo-64 manual (page 23):
https://www.st.com/content/ccc/resource/technical/document/user_manual/98/2e/fa/4b/e0/82/43/b7/DM00105823.pdf/files/DM00105823.pdf/jcr:content/translations/en.DM00105823.pdf
Connecting the USB to the debug port IS powering the MCU through the debug pod. Try removing the 2 ST-LINK jumpers on upper left an inch from the the USB connector. That disconnects the built-in ST-LINK from the MCU. That might remove the power from the debug pod to the MCU.
I found the reason: the problem was my fuse in the multimeter was broken and the irritating LED on the Nucleo is always ON (independently of the MCU is running or not)...
Related
I'm in confusion that will an I2C device get detected in raspberry pi even when there
are no device drivers and DTS files related to it.
Will it show up when we use this command
ls /dev/i2c-*
and are we able to detect its address when I try to probe using
i2cdetect -y bus_number
In short:
... when there are no device drivers and DTS files related to it.
Will it show up when we use this command
ls /dev/i2c-*
No. This command will list available I2C buses, not devices.
and are we able to detect its address when I try to probe using
i2cdetect -y bus_number
Maybe. In most cases yes.
A bit more elaborated:
Depending of what kind of I2C device it is, and what you want to do with it, you might still be able to communicate with it.
driver - best case
If you have relevant device tree change to describe this I2C device (on what bus it is located, its address, extra signals if needed - like interrupt pin, etc) and associated driver is present (built-in or as a module, check *_defconfig options in Linux kernel source) - driver should probe device during either boot or manual module loading.
Why best case? If you have a driver you don't have to think about protocols and programming, and, as an example, reading a value from ADC device might be as simple as:
root#pi:~# cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw
291
i2ctools
Another approach would be to use i2cget/i2cset tools from i2ctools package. No device tree changes needed. With these tools you can talk with any unclaimed I2C device on any enabled I2C bus in device tree.
You'll need to implement communication with I2C device by your own. From security and stability perspective - IMO this is the worst case to go, but is good for hardware debugging and, in some cases, initial bring-up.
Example is here.
Note regarding i2cdetect - this command tries to detect devices on particular bus, but gives no warranty. As per man i2cdetect:
As there is no standard I2C detection command, i2cdetect uses arbitrary SMBus commands (namely SMBus quick write and SMBus receive byte) to probe for devices.
I have ST-LINK dongle. When I try to connect in CubeIDE with Debug icon I have an error
Error in initializing the ST-LINK device.
Reason: No device found on the target.
It happens all the time. When I use ST-LINK utility I have the same problem, but when I push down RESET switch on board I have a connection.
Pins PA13 and PA14 are not used for another purpose. The setting in ST-LINK like Core Reset or Software reset does not work.
I only have a connection when I push down Reset switch and then try to connect only in ST-Link Utility.
Where do I make mistake and what is "connect Under Reset"?
Connect under reset means that when the debug probe connects to the target the reset line is kept active, so no user code can be executed.
I would advise to keep this always on unless you connect to the running target.
One thing could be that the software that is flashed onto your STM32 disables those pins and as such you can't connect debug/program it when it has booted.
Keeping the STM under reset while trying to connect and then releasing the reset bypasses this bootup and lets the ST-LINK interface control the STM.
I am trying to establish a serial connection between the RPI3 and an Arduino. Because that wasn't working I connected a USB to TTY cable from my laptop to the Rx/Tx pins of RPI. I was eventually able to use PuTTy to connect to it.
I am running Android Things on the RPI and the android code I have running is supposed to be a loopback (reading from UART and writing back what was read).
Here is where I am confused....
When PuTTy connected I was presented with a command line console on the RPI.
How do I get the Rx/Tx pins on the RPI to just be serial connections into and from my application and NOT a way to log into the console?
Is that a bad idea? I suppose if I ever needed to log into the RPI this would make it more difficult...
I figured out what I was doing wrong...
When following the setup directions at the below site I was using the Bluetooth mode instead of the Application mode. When I followed the directions for Application mode I was able to start using UART0 for serial comms
Set the console attribute to the following in cmdline.txt:
console=tty0
Add the following line in config.txt:
dtoverlay=pi3-disable-bt
Remove the following lines from config.txt:
enabled_uart=1
core_freq=400
https://developer.android.com/things/hardware/raspberrypi.html#disabling_the_console
Beginning with Developer Preview 3, in which USB-Serial devices support added, You can use external USB-UART dongles like this instead of UART of Raspberry Pi 3.
I bought a new Arduino Ethernet Shield and hooked it to the Arduino Uno.
I am trying to set the IP address of the device to 192.168.1.177 tried File-> Examples -> Ethernet-> Webserver.
When I upload this - I get a "server is a 0.0.0.0'message in serial monitor !
My IP is set to 192.168.1.177 and setup a mac address of 0xB8, 0x27, 0xEB, 0x98, 0x46, 0x61 in the webserver code.
Appreciate any help in setting this IP address. ( I tried other combinations as well )
The Arduino Ethernet shield is mounted on the Arduino Uno, and connections are lined up .
i fix this problem by pressing firmly the shield to the board
This can manifest from many different causes. I ran into this and figured out that in my case, my the USB port + cable were not allowing sufficient power to the Ethernet chip.
I have 3 cables, 6in, 3ft, and 6ft. Only the 6" one had sufficiently low voltage drop to power the shield.
I honestly couldn't believe it, but there was a 0.1V drop between the 6in and the 6ft cables. When plugged into A USB 3.0 port with the Arduino loaded, I measured ~4.5V for the working 6in cable vs ~4.4V for the non-working 6ft cable.
I have 3 types of USB ports: 1.1, 2.0, and 3.0. Only the USB 3.0 ports provided enough power to power the shield. Thus for my case, I had to use the shortest USB cable on the 3.0 port.
When the Arduino's 5V rail was sufficiently sagging, the 3.3 Linear Regulator entered dropout mode and on all the non-working configurations I saw ~3.1V on the Ethernet shield's 3.3V rail, which is apparently sufficient to cause this symptom.
I wrote a program to use I2C with stm32f407vgt on my board but it doesn't work. I checked the clock(scl) and it was OK , then i tested the same program on stm32f429 discovery board without changing any settings and it worked. any idea about what should i do ?
my micro is stm32f407 and i use internal clock source.
Thanks hamid