USB device is not detected properly - usb

I am using am335x board.USB device is detected when it is inserted while booting up the board. after the board is booted up, i unplug the device and is inserted again,it is not detected.usb driver switches off the vbus session when a device is disconnected from its port.every time i need to start the session using the command "echo F > /proc/driver/musb_hdrc".How to make it auto detect? If anyone has faced this problem,please post reply.

If faced the same problem. It seems that when you use ULPI mode, starting vbus does not work.
Have a look on a newer kernel in file drivers/usb/musb/omap2430.c
When an USB_EVENT_ID got notified, you should turn on vbus independtly of the mode your otg is working.
hope that helps.

Related

How to install ST-Link driver onto STM32 Discovery Board for Visual GDB Debugging

I am attempting to program a STM32VLDiscovery Board, using Visual Studio 2019, Visual GDB and STM32CubeMX. When I connect the board to the machine, it appears as 'USB Mass Storage Device'. I am using a Windows 10 VM. The program builds fine, but when I attempt to begin on-board debugging, I get an error message stating:
USB Mass Storage Device" does not appear to have "ST-Link Driver"
driver installed. The debugger may have problems finding your decvice.
Try installing it now?
If I click yes, then a bit of software called UsbDriverTool.exe starts and a progress bar appears with the message
VisualGDB is installing the following USB driver: ST-Link Driver the following device: USB Mass Storage Device
This then fails with the message
Automatic driver installation gailed. Do you want to try installing it manually?
Clicking 'yes' again gets the message
USB driver installation failed with code -532462766
And then finally
open failed (no matching adapter found)
Can anyone tell me please, how I go about getting the ST-Link driver on to the discovery board so that I can start debugging my code?
(One other thing that may be relevant. I tried using the STM32 ST-Link Utility program to program the code on to the board. I find that it will only connect to the board if I am holding reset whilst I press the 'connect' button.

FATAL error ST-Link No MCU device found

I'am using IAR Workbench and I am having hard time to flash my STM32F407VG I got:
FATAL error ST-Link No MCU device found.
The USB cable connecting the laptop and the MCU is new so I don't think it's the problem.
ST-Link en.stsw-link009 is installed
When I go to project options Debugger > ST-Link > Reset > connect during reset and try to download again I got:
Warning stack pointer is setup to incorrect alignement stack addr = 0x00000016 after the download progress bar stay blocked.
By navigating in the option menu I find it's possible to adjust CPU frequency actually it's 72 MHz, the default one, I changed it to 168 MHz, the CPU frequency but the problem remains.
Could you please suggest me some solutions to debug/resolve the problem.
Edit
I have used STM32 ST-Link Utility and i succeded to connect to the board, But the problem with my IDE is not resolved yet.
I used ST-Link Utility to erase flash memory, once this is done i activated
Debugger > ST-Link > Reset > connect during reset
and all works well, i don't know why but i'am glad to see my board works again
Thank you for your help

Grub displays on-screen unable to get into bios

I installed GRUB and it only shows GRUB on the screen, I am unable to type anything. I am unable to get back into my bios to boot from usb.
Any help would be appreciated
If the only thing you see is GRUB printed on the screen, something is wrong with your grub installation.
You can follow these steps to correct:
Boot the PC from a livecd USB or CDROM (can be Ubuntu, for example)
Reinstall grub by typing grub-install /dev/<target block device>
Reboot and test
If you still have issues after these steps post what you're getting

BeagleBone Black not detected in network interface on Mac

I have a BeagleBone Black development board. When I initially bought it, I set it up on my Mac and was able to ssh into it without any problem. Then, I followed a tutorial once for sharing the internet of my Mac with the BeagleBone using USB and since then I was unable to SSH into my BeagleBone from my Mac. I tried updating the HornDis driver and it didn't solve anything.
What happens is that my Mac (Mavericks) detects the BeagleBone drive, but it doesn't show up in the network interface. Hence, I can't ssh into the BeagleBone at all. I tried installing both the FTDI and HornDis driver over and over and it didn't solve the problem.
I really need it to work on my Mac and I'm kind of lost at this point. Any help would be really appreciated. I can't reinstall the OS in the BeagleBone because I have some very important project work installed and working in that BeagleBone and don't want to reinstall all those packages again.
Thanks.
I have solved this problem by resetting the SMC and the PRAM. Here are the details if someone needs it:
Reset the SMC and PRAM
SMC Reset:
Shut down the MacBook Pro.
Plug in the MagSafe power adapter to a power source, connecting it to the Mac if it's not already connected.
On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
Release all the keys and the power button at the same time.
Press the power button to turn on the computer.
PRAM:
Shut down the MacBook Pro.
Locate the following keys on the keyboard: Command, Option, P, and R.
Turn on the computer.
Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys.
After following the above two steps I plugged in the BeagleBone and it was detected in the network interface. I was then able to successfully ssh into it.

Raspberry Pi shutdown destroys file system

I trying to write a small c program witch reads out an GPIO pin to shutdown the pi externally. The triggering of the signal is working well. The program is started by LXDE as autostart application. If the program detects the shutdown signal it's performing:
sync();
system("halt");
Why does this program damage my ext4 file system after a couple of reboots. There is no fixed number of reboots necessary to damage the system. I don't see any difference by writing halt to command line. I'm using the newest version of the firmware(last update today) and also the kernel is up to date(last update today).
Does anybody have an good idea about it?
This app is a good idea, i wonder nothing like this is already existing...
I think the problem is the "halt" command.
You shuold use the explicit command "shutdown -h now" instead.
For further reading see Anthony Lawrence