STM32: usart IAP - c

I'm trying to use example code provided by X-CUBE-IAP-USART package to develop IAP FW for STM32L0xx device. I'm using STM32L073 Nucleo64 board for development.
When I send compiled FW using TeraTerm's YMODEM protocol nothing happens.
Only thing that is being send to target STM device is: "ota_test.elf166988 13332031541 100644¶Ê" over and over again. When I debugged example code I was getting HAL_TIMEOUT on receive. (rework example code to work with interrupts?). I've triple checked my USART settings so that is not the problem. Cam anyone please help me or send some functioning example code please? Original example code was written for STM32L073 eval board, but I've ported it to work with NUCLEO board, maybe I've made mistake there but, I've configured all peripherals exactly as they were configured in example code.
I appreciate any kind of help.
Thank you.

I am using STM32L476 and faced same issues while writing boodloader for my project.
The problems I encountered are:
HAL_UART_Receive() not working properly, always returning HAL_TIMEOUT
After the uart problem was solved, I was still not be able to upload bin files. Where I noticed that the codes were trying to delete the wrong memory address.
Applied solutions:
I changed the usart conection options. I used DMA channel to receive ymodem packages.
In the FLASH_If_Erase() function, pEraseInit.Banks configured 'FLASH_BANK_1' instead of 'FLASH_BANK_2'. I guess this was a bug and needs to be updated by ST developers.
I added the bootloader projects link where you can find all codes and the changes. Hope it helps with your problems.
Link : https://github.com/yelkovany/Embedded_codes.git

Related

Strange Error Message when Using CMSIS 5.7 with STM CubeIDE during Code Generation

I get a strange Error Message during the Code-Generation Process in STM CubeIDE for a STM32F4 target:
The Details:
I am using STM CubeIDE for an embedded Project with an STM32F405 Microcontroller and I have added the CMSIS Package 5.7.0 to the project, because i need some of the DSP functions. I have allready done this before and never experienced such an error message.
The message pops up during the Code-Generation process, after changing something in the Hardware-Setup with the (built in) CubeMX. It occurs two times during the Code Generation process. I can click on "OK" and it does NOT interrupt the Code Generation process, which seems to finish successfully. I can also compile the project without errors and it seems to work ok.
The Question:
Even though it seems to work properly, I'd like to know: what is this, where does it come from, and what can I do to solve this? I'm affraid that might lead to some unpleasant sleeping bugs or other nasty stuff ...
Has anyone experienced anything simlilar and has an explanation or even a solution for this?
Hint: I have recently update to CubeIDE 1.6.0 - maybe this is a Bug in CubeIDE and not in CMSIS?
What I've done:
I tried to google that, with the keywords:
"SliDtzliTZ&" and the "LogicalParser:syntax error detected in expression for ARM.CMSIS.5.7.0" but did not get any usefull results. Next step was to post the question here ...
Thank you in advance,
Chris
This problem happens with release version 5.7.0. Using any older version available in the official repository solves the problem.
I'm using 5.6.0 now and all is fine.
Edit: Problem persists on 5.8.0.

SPIFFS on an embedded ARM project with 32mb IS25LQ032B device

I've been looking at the SPIFFS file system project on https://github.com/pellepl/spiffs and it seems like it has a pretty large user community. I've been looking at the WIKI on the integration and configuration which seems to be well documented. I didn't see a user group forum? is there one?
My question pertains to the actual formatting of the flash device, within the examples shown in the WIKI pages I didn't example code on how to format the flash. There's a description, but it doesn't show an example of how to use the API.
I'm hoping someone might know of example of how to use the APIs. Any help is greatly appreciated.
I'm all set, I took another look at the API's and I figured out how to use them to mount and format the spi flash to initialize it. I ran thru the test example and it works. It went better than expected.

Cannot modify example for ESP8266 provided by espressif

My setup consists of the Espressif SDK using eclipse and a nodemcu, which I want to program in C.
I have followed all he steps and I can compile and flash the board from the eclipse environment. I don't press any buttons to load the flash because the board can handle it by itself (at least that's what I read). According to this apparently I have a nodemcu 0.9, but the board I have doesn't look quite like the one in the picture (the microstrip antenna looks weird .. and on the back of the board it says www.doit.am ESP12E devkit V2 ... the antenna on mine doesn't even look like the one on the site listed behind the board).
I looked past everything and kept on going. I compiled the blinky example on espressif and flashed it. I saw that it created the eagle.flash.bin and eagle.irom0text.bin and loads them in 0x00000 and 0x10000 respectively (according to documents I've read this is ok). When i reset the board I can see that it really flashed and there is a program in it since the led is blinking. Then I tried the hello_world example. Everything went accordingly and after I reset the board I see that the led keeps on blinking at the same frequency and when I connect to the board via the terminal.exe provided by espressif I can only see garbage in the output, even though the baud is correct according to the code (even so I tried all different bauds possible in terminal.exe).
Ok ... then I went to the blinky example again and increased the delay between blinks. Flashed it and the the frequency stayed the same. I know that it created new .bin files, but still, nothing changed. This led me to create a new project. I did it, following the instructions provided by Mikhail Grigorev. I just put an infinite loop, expecting to get nothing, but after flashing the newly compiled firmware I can still see the led blinking at the same frequency even though there is absolutely nothing in the code, I even wiped the flash before (yes, I verified the flash was empty).
So this lead me to test every single example I could compile. I noticed that some didn't blink the led and others did, like nothing happened. After that i downloaded the nodemcu firmware, and after loading it I noticed that it worked properly and I could even see the ESP in the available wifi networks.
I really don't understand what's happening. Why do some examples work and others don't? Why can't I modify the source code of a simple blinky and see the change? I really prefer to use the esp module this way, since I don't like the arduino interface or the way that it uses a static setup and loop functions, and I don't want to program it in LUA.
I even checked the makefiles provided by espressif and the only difference I can see are the BOOT and APP variables. I even tried modifying them, but still .. no changes.
Can anybody help me?
Ok, finally found my problem. The thing is that the espressif SDK needs some software bits on certain addresses of the flash. What initially happened is that I erased the flash as soon as I got the board, assuming all those binaries would have already been stored in flash.
The next thing I did is that I tried putting all the other binaries, but I was putting them in the wrong addresses, so the software wouldn't work.
Finally, after many many hours of reading forums and reading documentation, I found the correct addresses and it worked.
The addresses are:
0x00000 - boot_v1.6.bin
0x01000 - firmware application (I set the makefile to BOOT=new, APP=1, SIZE_MAP=6)
0x3fc000 - esp_init_data_default.bin
0xfe000 - blank.bin
0x3fe000 - blank.bin

Is it a good idea to use a Screensaver on a raspberry pi as digital signage?

I asked this question in the Raspberry PI section, so please forgive me for posting this here again. Its just there doesn't seem to be as active as this section of the forum. So, onto my question...
I have an idea and I'm working on it right now. I just wanted to see what the community's thought was on using a screensaver as digital signage. Every tutorial I've read shows someone using chromium in kiosk mode, and while that's fine and works well for some uses, it doesn't work for what I need. I have successfully completed a chromium kiosk, and it was cool. But the signage that I need to create now, has to work without internet. I've thought about installing LAMP locally on the PI, and still using chromium. I still may have to if this idea doesn't pan out. All I need from the signage is a Title Message in the top center, and a message body underneath it, with roughly 300-400 character limit. My idea is to write a screensaver module, in C, that will work with a screensaver such as xscreensaver. The module would need to be able to load messages from a directory on the pi. Then for my clients to update their signage text, I would write a simple client that sent commands as well as the text via SSH to the pi. I want to know what other people think about this. Is it a good idea? Bad idea? Should I "waste" my time doing something like this?
Thanks in advance.
I am already using a rPi as digital signage, just over a year. I am using two different setups:
version 1 uses Raspian loading xdesktop and qiv image viewer to cycle images stored on the Pi itself, synchronized with a remote server. The problem I found was power and SD stability, when the power fails, which it will do no matter what, just when... The Sd card can become corrupt due to all the writing that Raspian does all the time. Certainly does not really need to write to SD.
version 2 uses a RO-filesystem and a command line image tool. Uses the same process to show images from local, and sync with server. But power fail causes no ill effects.
I am not using screensaver to display images, that seemed redundant to me, and unnecessary to wait for the SS to start just to display the images.
Some of the images are created using imagemagik, which is nicely dynamic where needed.

Detecting attached USB devices under Mac OSX

First of all a statement: I'm a newbie when it comes to programming for the Mac. However I have an assignment which requires USB communication with a device so I thought I'll start with something basic.
I took the code from here, built it and ran it from the Terminal. It starts up and writes:
Looking for devices matching vendor ID=1351 and product ID=8193.
Starting run loop.
However after this, if I plug in and out USB devices (I tried: iPod, GPS, mouse) nothing gets written on the screen, although as much as I understand there should be whenever I connect and disconnect a device.
What am I doing wrong?
Thanks in advance.
You can also use system_profiler SPUSBDataType on a terminal
I found /Developer/Applications/Utilities/USB Prober to be of great use.

Resources