A way to stop stm32 nucleo l4r5zi from supply 5v out - windows

I have A STM32 Nucleo l4r5zi.
It is placed somewhere and I have only control over the PC who the Nucleo is connected to.
I want the Nucleo to stop supply 5v out from his pin IN ANY WAY.
I don't care to restart the nucleo or shut it down. just somehow stop for a 10 second the supply power from his 5v pinout.
How can I do this ?
I tried to solve it from the OS (by stoping supply the USB with power) but i could not manage to do so.
I can only change the code or change things on the os. no any physical modification

As the schematics prove, you cannot reprogram the "main" STM32 controller (in your case, STM32L4R5ZI) to switch off the '+5V' signal.
Instead, you have to reprogram the ST-Link controller on the nucleo board (STM32F103CBT6) so that it controls pin PB15. Note that this will probably render your nucleo board useless (apart from the use not to drive the 5V pin...). I'm not aware how simple it is to reprogram the ST-Link controller. If this really is what you want to achieve, you should post another question if/how an arbitrary firmware can be flashed on nucleo's st-link controller.
Of course, you can remove the jumper JP6, but as I understand your question, you don't have physical access to the board.
If by "on the os", you mean to change the configuration of the USB port on some PC attached to the board, this question appears to me to be off-topic, so I don't follow this path any further here.

Related

Flashing a Cyclone IV's SROM chip via its JTAG connection

Is there an inbuilt or pre-existing feature I can use to accomplish Flashing a Cyclone IV's(EP4CE6E22C8) SROM(W25Q16BV) chip via its JTAG connection? Maybe some setting when compiling in Quartus to tell the FPGA "Hey flash this". Or a specific command for OpenOCD.
I saw that there are IP cores to manually flash the device, but I really do not want to go down that rabbit hole. Programming my own flasher sounds like an unnessisary hell at my experience level.
I hope this is good enough of a question, Ive been suffering with this for months, if you need any more information
INFO:
I have a W25Q16BV SROM chip connected directlyto a EP4CE6E22C8 in AS config mode. (Data input on SROM has single direct connection to FPGA's ASDO)
And to that FPGA I have a JTAG connection that connects to my computer via a J-Link adapter.
Controlling the J-Link adapter is OpenOCD that uploades compiled data(SVF file) provided by Quartus Prime.
The board is from an obscure seller, but it did come pre-flashed with an example program that starts upon every reset, so there must be some way they uploaded this.

How to enable wake on usb (remote wakeup) in android?

I have an AOSP tree compiled on my board. I bought a wireless keyboard and connected it to my board via usb port. I expect when the board is in the suspend state, it will wakeup by pressing a key on keyboard. But it is not so.
I tried several ways in my bootloader (uboot), kernel, etc. But no effect. Additionally I made an experiment and found out that in the sleep state, my usb port (which has a dongle in it) has just 1-5 mA. But it should be higher for the dongle to work!
Has anyone experienced this? How to enable remote wakeup for usb in android?
Thanks
More info:
The uboot supports usb host controller interface. I tweaked kernel build options. but these two actions has no effect.
EDIT : I work on p212 reference board of amlogic. Its SoC is Amlogic S905X.
EDIT 2 : I tested the board (which is a tv box actually) using my phone and its charger and I found that when the box goes to sleep, the charging is stopped!! So I can deduce that the dongle has not enough power to stay alive! (yet to send wake signal to SoC !)
Then I carried out a second experiment: I connected the phone using a USB charger which only has two pin instead of four. (Just voltage supply; differential pins (signal pins) are disconnected). The result: my phone is charging now!! It seems when the SoC is suspending, it sends a signal to USB peripherals telling them to not draw power. Am I correct? How can I configure my AOSP tree and Linux kernel and uboot bootloader to avoid happening this?
Please guide me how to fix it in kernel or other parts of stack!
EDIT 3 :
I have pasted my kernel config here. I configured these options to y but has no effect:
CONFIG_PM_RUNTIME=y
CONFIG_PM_AUTOSLEEP=y
CONFIG_PM_DEBUG=y
CONFIG_USB_OTG_WAKELOCK=y
CONFIG_USB_DEBUG=y
CONFIG_USB_OTG=y
Also this link is my device tree files. (in kernel. NOT uboot)

8Mhz Bootloader for Arduino Micro

I have just finished a project using an Arduino Micro dev board and want to move to a standalone ATmega32.
I need to run this at 3.3V and I dont want to go down the overclocking road so I have an 8MHz crystal to put on it.
I still want to be able to upload sketches via USB and the Arduino compiler so I gather I need to burn a different bootloader.
For this purpose I have purchased a USBASP programmer.
I am slightly unsure of what to do next - everything I can find on the topic either relates to the ATmega328 or to burning bootloaders using another Arduino.
I have worked out that I need to modify boards.txt to point to the correct bootloader....but which is the correct bootloader for ATmega32 at 8Mhz?
Also do I need to change any fuses?
Thanks
I think you're a bit out of luck.
The ATmega doesn't have hardware USB, so I assume the bootloader is using V-USB to implement USB. That stack, being a software implementation of USB's high-speed signalling, requires at least a 12 MHz clock (higher is better).
I don't think you can run V-USB using only the internal 8 MHz oscillator.
According to the OP comments the micro is indeed an Atmega32u4, not an Atmega32 (#OP: please fix the question to match this).
Since it has onboard USB, you can use a pre-existing bootloader like the sparkfun one:
https://www.sparkfun.com/products/12587
Here you have the link to one of their products, the Arduino pro micro 3.3V (which runs at 8MHz). You can add the sparkfun arduino boards repository to your IDE and then just use the board specification for their pro micro 3.3V do upload the correct bootloader and to program it through the USB just like the usual Arduino Micro.

Sasebo GII virtex5 fpga configuration

I am working with Sasebo GII board that has two FPGAs on it:
Xilinx Spartan and Xilinx Virtex5 (and the board has several separate JTAG interfaces for configuration of fpgas).
I am useing ISE 14.4 under Linux and I have some troubles to configure the Virtex 5 FPGA.
(no problems with Spartan).
I am using "Impact" to send the configuration files to FPGAs.
At the beginning Impact scans the board and finds Spartan FPGA without problems
and I can configure it, but when I plug the cable to the other interface and press scan on Impact it says:
"There are many unknown devices being detected. Press Yes to continue or press No to stop."
If I press the NO option, well, obviously nothing happens :-)
And if I click on YES it fails, I can manually add Virtex5 FPGA, but than it fails to upload the config file to it (and even fails when I try to detect the device ID).
I already tried all JTAG interfaces on the board, nothing.
Same operations work on the same board with SPARTAN FPGA, so I'm stuck. Any ideas ?
Well, I am not familiar with that particular board, but there are many things you can look into when it comes to your JTAG problem.
Check the voltage of your VCC, make sure it has a good value for the board
Make sure your ground connection is well connected and you don't have much impedance
between the connector's GND and the boards GND
Try other JTAG connectors and see if you see any difference in the detection of the
devices.
Try to run the IMPACT in debug mode. Capture the data and see if the patterns look OK
Also something that may not be JTAG related, is to make sure your V5 device has all the powers it needs, if there are any power problems, it may cause the JTAG interface to behave like you explained here.
Also, look on the board and see if there are any switches or jumpers to chose different way of configuring the V5 device. This can be a big issues with multi-FPGA board, maybe the V5 is configured to be programmed from a controller or other devices on the board and the JTAG chain is not set up for programming.
These are just different thoughts, they may help you toward the right direction.
Found this on their site:
User guide for the board
To reprogram the flash ROM (ST45DB16D, U11) for the control FPGA (Spartan-3A), attach the configuration
cable to CN7. For configuration, use the provided mcs file sasebo_gii_ctrl.mcs.
Reprogram the flash ROM (ST45DB16D, U4) for the cryptographic FPGA (Virtex-5 LX30) with the provided
mcs file sasebo_aes_comp_lx30.mcs as well. Connect the configuration cable to CN4.
To configure the FPGA immediately after reprog
ramming of the flash ROM, cycle the power.
Blockquote
This means you can't program the FPGA directly, you need to convert your bit file into MCS file and then load it into the FLASH memory on the board.

Communications between Visual C++ and Arduino:

I have a Arduino app that needs to talk to my PC across the USB (Serial) connection. I have this bit of code that I lifted from the Arduino Playground at
http://arduino.cc/playground/Interfacing/CPPWindows#VisualStudio2008
this->serialPort1->PortName = "COM5"; // Replace with your COM port!
this->serialPort1->Open();
this->serialPort1->Write( "7" ); // In the future, you'll expand on this
// to write your custom data to the board
this->serialPort1->Close();
My question is how does one determine what COM port the Arduino USB cable is attached to?
There are several ways you can approach this.
The most obvious is that you simply make your application configurable and tell it which serial port to use. The port name should never change, unless you have other processes on your machine allocating virtual COM ports such as Bluetooth drivers.
A second option is that you can do what the Arduino app does and scan the serial ports on the system looking for the hardware. Since you are using the CLR, System.IO.Ports.SerialPort.GetPortNames() will give you a list of all the serial ports on the system. (You can also get this from the registry.) Then you can enumerate through them and check the status of the pins to see which serial ports have devices attached. You should probably include in your sketch a way to query the Arduino so that you can send it a command and have it give a fixed response. This would allow you to discern your application from other serial devices such as modems.
There is a third option which would involve figuring out where the FTDI driver stores its configuration information in the system/registry and going from there. This is a bit more involved, so I can't give any information on if this approach is even viable.

Resources