-
Notifications
You must be signed in to change notification settings - Fork 298
Description
@PeterChristen577 First off, thanks for contributing the STM32 port. Below problem was encountered running on a H7 cpu.
I got the demo running fine on the STM32F746-Disco board. I imported OpENer successfully into a new STM32F746-Disco TouchGFX template project. Needed one small change for freeRTOS CMSIS_V2 vs _V1. Both these were tested with enip/explorer and wireshark. Explicit and implicit messaging working perfect.
I imported into a STM32H745I-Disco TouchGFX template project. Got everything setup for this board but started getting some random data in the enip/explorer implicit messaging. Wireshark showed a few good packets were transmitted and then one or two malformed packets would be sent. Troubleshooting this lead to what appears to be a cache coherence issue.
In cipioconnection.c SendConnectData(...) I changed the the outgoing message to
static ENIPMessage outgoing_message __attribute__((section(".outgoing_message_hack")));
and stuck this with the non-cached lwip heap memory. This got the sample application running on this board without any malformed io packets (at least for single connection). The cpu frequency was higher on this board and the ETH is MII vs RMII which might be contributing factors. I didn't check the F746 to see if malformed packets were still occurring but just way less frequently.
Any ideas for a more elegant solution than the above hack?