This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX5 and network BUG??!?

Hi all,

After some hours I decided to start a new empty project with default configuration like this

1. New uVision project
2. STM32F107RC as CPU
3. Selected the next components: 3.1 RTX5 (library) then resolve 3.2 CMSIS driver -> Ethernet MAC and Ethenrnet PHY DP83848C then resolve 3.3 Network IPV4 release 3.4 Interface ETH0 set to 1 3.5 UDP sockets
4. Configure ethernet in RTE_Devices.h with RMII
5. Added a user code template CMSIS->KeilRTX5 'main'
6. Add the setStart function to main. Now main looks like this


/*----------------------------------------------------------------------------
 * CMSIS-RTOS 'main' function template
 *---------------------------------------------------------------------------*/
#include "RTE_Components.h"
#include  CMSIS_device_header
#include "cmsis_os2.h"
#include <rl_net.h>

#ifdef RTE_Compiler_EventRecorder
#include "EventRecorder.h"
#endif

/*----------------------------------------------------------------------------
 * Application main thread
 *---------------------------------------------------------------------------*/
void app_main (void *argument) {

  // ...
  for (;;) {}
}

int main (void) {

  // System Initialization
  SystemCoreClockUpdate();
#ifdef RTE_Compiler_EventRecorder
  // Initialize and start Event Recorder
  EventRecorderInitialize(EventRecordError, 1U);
#endif
  // ...
  osKernelInitialize();                 // Initialize CMSIS-RTOS
  netInitialize ();
  osThreadNew(app_main, NULL, NULL);    // Create application main thread
  osKernelStart();                      // Start thread execution
  for (;;) {}
}

All the configurations are at default values. If I start the application in debug a HardFault exception is trowed, the fault log shows "INVSTATE" bit set.
No matter where the 'netInitialize' is called, before or after any function or inside the thread, the exception is trowed. Also tried to change all stacks to sizes to the highest possible value and the exception is trowed.
Also tried to use the event recorder and the network component to debug and all is ok, no errors found.

Thanks all