Wednesday, May 11, 2022

STM32F7, LWIP, FreeRTOS Error stopping on configASSERT( pxQueue->uxItemSize == 0 );

There is an unclear bug spotted recently in STM32F7 with FreeRTOS v2 and LWIP (ver. 2.1) library.

After a moment of using ethernet socket data stream soft hangs at this line: 

configASSERT( pxQueue->uxItemSize == 0 );

It seems related to semaphore/mutex internal code issue. Could not find chance to dig too deep into it, but this post gave me a good hint: 

I made the similar approach and made semaphore statically defined:

osSemaphoreId Netif_LinkSemaphore = NULL;

in the same lwip.c file.

So far it seemed to help with above problem.

Regarding other different issues with STM32 ethernet communication there is a nice compilation which might help us all:

Thursday, March 10, 2022

Useful links for CANopen in embedded platforms

    Here are useful links to resources and information on CANopen embedded programming in general but especially on STM32 microcontrollers.

CANopen Node project

CANopen Node code issues

CANopen stack on embedded devices

CANopen Node supported devices

CANopen Node on Linux

CANopen Node example code

CANopen Node Tutorial and testing

CANopen Node port on STM32

CANopen Node on STM32

CANopen application layer poster

CANopen for Python

CANopen NOde Object Distionary editor

CANopen quick reference sheet

CANopen for Python documentation

CANopen node documentation

CANopen node discussion on SourceForge (abandoned)

CANopen PDO example

CANopen on Wikipedia

CANopen hands-on tutorial slides

CANopen Nanotec online manual

CANopen Node random project Microchip source code

The Basic of CANopen white paper

CAN bit time calculator

CANopen basic explanation on CANFestival basis (RUS)

CANopen practical explanation (RUS)

CANopen explanation (RUS)

CANopen explanation (RUS)

Wednesday, January 12, 2022

Arduino Nano and MCP2515 bringup problem

    When using examples from internet like this popular for example: make sure you check your MCP2515 adapter board's hardware. Author of library assumes that MCP2515 are connected with 16MHz clock, and example script CAN_read initialize connection with 16 MHz crystal. In case when your board comes with different crystal remember to change code accordingly.

In my case it was needed

mcp2515.setBitrate(CAN_125KBPS, MCP_8MHZ);

 instead of just:


My noname adapter coming from depths of Asia looks similar to this:

For connection to Arduino Nano you can follow this guide:

Monday, December 6, 2021

USB 3 controller error: Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19).

    In case of situation when your computer USB's are not working anymore. Check your Computer Management and in section Device Manager look for USB section and yellow exclamation sign. If you see under properties message: "Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19).", than follow this link and follow steps in accepted answer regarding modification of registry. It helped for me and saved a lot of time otherwise I had to run computer repair installation. None other options like roll back drivers, or installing manufacturer drivers did not work out as they are windows system drivers.

I guess that happened because I was tinkering different around Microchip USB devices which support package somehow messed up some settings in USB enumeration or something similar. After registry edit and following reboot all connected USB devices searched for drivers and now everything works again.

My case was related to Intel USB 3.0 hub, I have seen other devices which can cause similar error message, but than registry class code will be different. This above recipe can help in case of USB hub problems.

Saturday, September 5, 2020

Office 2013 and Office 2016 Outlook error - An unexpected error has occured

     Recently several computers constantly issued an error messages when starting Outlook application. Message text was "An unexpected error has occurred." And after accepting an error with OK button, Outlook app just closed. Loop continues forever, you just could not use Outlook at all. Lot of attempts was made to resolve this issue: starting Outlook in safe mode, Office installation repair, full reinstall. That did not help.

Both computers were Windows 10, one has Microsoft Office Home and Business 2016, other has Office version 2013.

The solution in this case for both computers was, creating new Windows users and as as result of course creating new profile structure. Than you have to copy all important files to this new profile back (documents, pictures, bookmarks etc.). Good thing is that most likely when you face this Outlook issue is fresh installed system and you don't have many custom files on computer.

OK, and what was important in my case, you don't just create any user profile, but you try to avoid Unicode characters in profile name (just use Latin ASCII character keyboard set). In my case originally were letters 'ā' and 'ū' in user names, which I changed to 'a' and 'u'.

Anyway it is quite strange that Microsoft in practice still is not supporting Unicode in their software. And looks like it is still better to stay away from "strange" characters in profile folder names. It was English/US versions of both Windows and Office software in my case, might be that localized software versions lacks this problem. Hope this info can help somebody.