ST-Link no connect - embedded

I've made a mistake and programmed to STM32h745 dual core processor program which was created to STM32H743 with one core. Now I have a problem with connection and ST-Link doesn't recognize device.
What can I do with that?

When connectiong cycle reset button. You can find a moment when the bad firmware still is not reprogrammed IO-s and ST-LINK than can stop the core.

The solution was pulling up BOOT1 to 3V3, connecting to supply and clearing the memory of CPU. But unexpectedly it turns out that it was caused by programming the wrong soft by it happend always after programming the soft generated by CubeMX. I don't know what is wrong with that

Related

Why changes made with processor expert do not apply to my code?

I am facing a problem with Processor Expert in CodeWarrior.
I can't make changes made in peripheral apply to the generated code.
For example, in a code that uses a timer, if I disable the timer, regenerate the code, compile and load the code, it keeps working.
On the other hand, if I start a project from scratch, the same code does not work until I enable the peripherals (in this example, the timer).
So it looks like the first code generation works fine, but then any change made to the same peripheral has no effect.
I tried searching for a clue, and took a look at the Processor Expert user guide, with no luck so far. I appreciate any idea about what I could be doing wrong.
Thanks
I solved the problem a little while after posting this answer. I had started the project with the option Processor expert enabled. I started a new project, enabling Device initialization instead. Everithing works as expected now, whit the modifications done in Target CPU windows applying to mcuinit.c after generating the code.
This user guide helped me undestand the difference between Device Initialization and Processor Expert.

ATtiny45, Arduino programming error?

I set up my Arduino and ATtiny45 the way the tutorial How-To: Shrinkify Your Arduino Projects showed. I wish to make an LED, hooked up to my breadboard, blink.
I'm running Windows XP, and I have the latest release of the Arduino IDE and have set up my programmer to be Arduino as ISP, as well as my board to be ATtiny45 (8 MHz internal clock).
The problem occurs when I try and upload the compiled code onto the board. The IDE returns this error:
avrdude: stk500_getsync(): not in sync: resp=0x00
I have searched for answers for a long time, but I found nothing. How do I fix it?
It means that your microcontroller is not detected. Things to check:
Wiring: are the pins used for chip programming correctly connected (no crossing?)
Power supply: Is the board properly powered?
PC configuration: Is the Arduino IDE using the correct port of the PC?
and from the Arduino help:
If you have an Arduino NG, did you press reset just before selecting
Upload menu item?
Is the correct serial port selected?
Is the correct driver installed?
Is the chip inserted into the Arduino properly?
If you built your own Arduino or have burned the bootloader on yourself: Does the chip have the correct bootloader on it?
Arduino is bootloader based. This means that the chip must have a little piece of software inside that is responsible for the communication with the Arduino IDE and the self programming of your application binary into the chip. This piece of software is called "bootloader". If your chip came empty ( sold separately or erased by mistake ), there is no bootloader inside.
There is no way to program a booloader into a chip without using an external programmer.
(Or another bootloader already inside. Some chips include a low level bootloader in the ROM...)
But, luckily for you, building a home made programmer for AtTiny is easy. Search google for "AtTyny ISP programmer".
And if you have questions about that, ask them at "Electrical Engineering StackExchange"
When you get a virgin ATTiny, you need to set the fuse bits on it. It does not require the Arduino bootloader, but the process is similar to burning the bootloader. This tutorial helped me get my ATTiny85 up and running, take note of the "Configuring the ATtiny to run at 8 MHz (for SoftwareSerial support)" section.
Also, I've noticed there are different 'board drivers': the items that appear in 'Tools > Board' in the Arduino IDE. You may be using a set that does not work, try this, this or have a google around to find more. Just be sure to go through the entire process when you try a new set (i.e. burn the bootloader, reboot, burn your code).
Good luck.
In my case i had the same issue with Duemilenove Arduino compatible board i bought
I found this fix.
Go to \hardware\arduino\boards.txt, find this line "uno.name=Arduino Uno uno.upload.protocol=arduino", replace the protocol=arduino to =stk500.
I don't know if it works on Uno, but it did save me from similar issue with Duemilanove.
I've had the same problem with getting attiny85 to work.
In my case, arduino micro was used to program it.
I digged into this problem and found that the recent version of arduino IDE(1.8.5) was slightly wrong with its configuration of utilizing the avrdude.
I'm assuming that you already tried burning bootloader but it fails with STK500 sync error.
How to fix:
Prepare a text editor program which is able to edit unix line ending files properly. eg) Vim, Emacs, Microsoft Visual Studio, notepad+, atom
Go to the arduino install directory. eg) C:\Program Files(x86)\Arduino
Open hardware\arduino\avr\programmers.txt with the editor you prepared. If it's under the program files directory, running text editor as administrator would be useful.
On line 44, you can find Arduino as ISP. Keep following those lines and edit these two lines like below.
arduinoasisp.protocol=arduino
arduinoasisp.program.protocol=arduino
Save and try burning bootloader again.
It must had stk500v1 as default. It basically should be the same but the recent version of avrdude(also included in arduino ide by default) has different workflow on them.
Another useful info: burning bootloader on attiny also does fuse work.

SAM-BA not responding with olimex sam7s256

I am using an Olimex sam7s256 board. I tried to get it up and running in linux (Ubuntu). I was able to successfully install GCC and binutils. I installed SAM-BA for linux from the atmel site. I was able to get the USB port for connection as specified in the SAM-BA manual (.dev/ttyUSB0).
But when I try to use the GUI and 'connect' there is no response.
I though that there is a connection failure, so when I presses the reset button in the board, I get a message "Failed to initialize FLASH accesses".
No matter how long I wait before pressing the reset button, I am not getting any SAM-BA window as given by other tutorials as below
can any one one help me out in this?
I did the 'tst' jumper set, reconnect the board for 10 s, disconnect and 'tst' jumper reset, reconnect before opening SAM-BA.
Any help will be greatly appreciated.
I am stuck.
It is the same for both SAM-BA 2.9 and 2.8.
By this point you are already connected. If you specified the at91sam7256-ek even if you arent using that board it will not put this gui up if it didnt talk to the chip/board. I recently went through this exercise with an olimex sam7s-256 header board. (with ubuntu linux). If I didnt specify the board type then the window came up but it wasnt really connected.
Notice how the code at 0x00200000 is valid instructions (most start with a 0xE and the vector table starts with a bunch of 0xEAs which are branches out of the vector table) that is ram it didnt make those up it read that from somewhere. Load a binary file into ram in the 0x00200000 range and the refresh the memory (assuming your binary is different from what is there) and see it change.
When ready/comfortable you can erase the flash and see in the memory window that the flash (0x0010000 or something like that) changes to all 0xFFFFFFFFs. Now remember it wont boot when you do that. With the board I have there is a jumper you move then power the board to get the built in bootloader re-loaded into the flash so that you can use sam-ba again, I am sure there is a way to do that with your board but read the users guide first.
Please do not close this person out for asking about using a software tool. There are countless numbers of how do I use my iphone simulator or why is my android simulator slower than my iphone simulator questions that dont get touched. this question is as relevant as any of the programming questions about how to use gcc or some web thing or how to start up my phone simulator or java vm. I wouldnt want to have to start a campaign to close all of the gcc or iphone tagged questions because they are not programming questions.
I think my question was misunderstood. The GUI window which I have posted is NOT what I get. I just posted it to say that I am not getting such a window at all. That window pops up only when I select 'no board'. When I select SAM7S256-EK there is no response. No window opens. As given in your blog sam7stuff.blogspot.com, I downloaded SAM-BA. The onlydifference as u have posted and in the response also id that u are using a 'h' board.
Right now I am using a custom made SAMBA alternative from this website,
http://claymore.engineer.gvsu.edu/~steriana/Software/
It is also a python based boot loader. It is command line though.
I would love to use the SAM-BA GUI. I am sure that the board is OK and samba is communicating with the board b'cos if I select any other board type other than ARM7S256-EK option it is giving me 'communication failure'.
If you have any suggestions please do let me know. Also many thanks for backing me up. I had some real good insights from this forum about embedded field and I felt it is a good place to discuss embedded programming doubts and never thought of 'programming' or 'non-programming' b'cos for SAM-BA user guide itself talks a lot about customizing the SAM-BA for a custom made board involving TCL scripts but I couldnot get hold of the concepts. So I thought someone would have had the same problem and would have found a TCL or C 'programming' solutions in this forum.
Thank you.

Api to turn on your computer

I'm Making a small on-line clock (both for fun and to learn a bit more of php and javascript) started it because i actualy need an alarm clock and this would be easier than buying one (don't ask)
Now i wanted to know one thing, i know it's impossible to turn on/off you're computer from a browser, but a friend asked me if i could do him a small addon/program that would fetch the alarm time he added there, and would turn his computer on so it would let if wake up
I know turning on must be pretty much impossible, but turning on from sleep/hibernate maybe?
Anyone knows any api to do this? Windows or mac, or cross platform.
Just for curiosity the alarm clock is here http://www.my-clock.net
Edit:
On the wiki page, wake-on-lan says it requires to turn the bios power to the network-board, is there any way arround this? Or are todays computers already ready for this kind of protocol?
There could be two solutions:
Use Wake-on-LAN as was suggested. But you must have another machine up on that LAN, it doesn't work over the Internet itself. So it goes like You -> [Internet] -> Waker -> Your friend.
You can set his RTC wakeup alarm over the Internet while his machine is still up and running. Then his computer will wake at the specified time.
Both would work even if the computer is completely powered-off.
Once a OS goes in hibernate/sleep the only way to bring it up is through some kind of kernel level hardware driver event. for example pressing power button or opening the lid of the system etc.
IMO it would be bit complex to model the functionality within an application, as application is dependent on OS level services, that are not available in sleep/hibernate mode.
I don't know a lot about how it works, but it sounds like you need Wake-on-LAN
Wake on LAN (WOL, sometimes WoL) is an Ethernet computer networking standard that allows a computer to be turned on or woken up remotely by a network message.
Your best bet may be Wake-on-LAN
As people have pointed out, Wake-On-Lan is one possibility. But there's another one that might suit your need. Most BIOS'es today already provide an option to turn your computer on at a given time. If your goal is simply to turn your computer into an alarm clock, this should do the trick.

Hardware Simulation

I'm working on a software project intended for recuperating old specific hardware, mostly for non-for-profit organizations and poor schools.
I need a way to simulate old hardware so I can test the application before shipping it out.
How can I do this?
I'm not sure exactly what the question is asking for. I think you are asking for a way to emulate certain HW?
If that is the case, I've used QEMU in the past, and it has worked great. QEMU is an open source machine emulator and virtualizer.
Use virtual machines? Prepare the images reflecting (more or less) the state of the target machines (speed, hardware, etc). And use them for testing the deployment?
You might want to check out Emulator Zone, and emulator is a good google search term you might not have tried.
Well. If the old hardware is communicating via RS232, then write a class that wraps the RS232 commands and make the class inject the messages the old hardwares would respond. In your program, work against that class instead of real rs232-port and just change instance to real rs232 before shipping.
I have done this succesfully in a project and it worked out really good and its not that complicated that you can think.