Freemaster - Ethernet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Freemaster - Ethernet

1,271 Views
tomas2
Contributor I

Hello, I want to use freemaster and ethernet communication, inits works fine, but when I send first message through ethernet freemaster stop working. I tried set up different interrupt priority and timeout but nothing works. 

Thanks.

 

0 Kudos
Reply
6 Replies

1,217 Views
FastDigitalTechnology
Contributor I

When you're encountering issues with FreeMASTER and Ethernet communication that cause FreeMASTER to stop working after sending the first message.

Check Your Code

Memory Allocation

Interrupt Handling

Timeout Handling

Error Handling

Debugging Tools

Resource Conflicts

Firmware and Library Updates

carefully reviewing your code and configuration.you should be able to identify and resolve the issue causing FreeMASTER to stop working after sending the first Ethernet message.

FAST DIGITAL TECHNOLOGY

0 Kudos
Reply

1,238 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

please describe your hardware (target MCU, board) and software (SDK demo version, configuration TCP or UDP).

Did you try the out-of-box fmstr_net demo?

Thanks,
Michal

 

0 Kudos
Reply

1,230 Views
tomas2
Contributor I

I am using MIMXRT1062 MCU and SDK lwip_udpecho_bm for ethernet and for FREEMASTER fmstr_example_usb_cdc. 
I want to send message through Ethernet to change some variables that affect some calculations and that results display in FREEMASTER. 

0 Kudos
Reply

1,222 Views
MichalH
NXP Apps Support
NXP Apps Support

So, is this correct?:

  • You have mixed the two demos (lwip_udpecho_bm and fmstr_example_usb_cdc) together
  • You use FreeMASTER over USB
  • You use network (some custom protocol) to send a message to the application to perform some calculations
  • You want to use FreeMASTER (over USB) to see if the application did the calculations well

General answer is: using FreeMASTER over USB should still work regardless of what is happening in the network stack (otherwise something else is broken). If you loose the network connectivity, but FreeMASTER keeps working over USB, than I'm afraid I cannot help you really - you will need to debug what is going on.

Please confirm my understanding is correct.

BTW: Mixing the network demo (which uses FreeRTOS) and a bare-metal USB demo could be tricky. I'd recommend to eliminate the USB completely. Just start from the fmstr_net demo and use the FreeMASTER over net too. 

Thanks,
Michal

0 Kudos
Reply

1,218 Views
tomas2
Contributor I

Yes, you understand it correctly. Except I don't loose network connectivity, network communication works fine, just Freemaster stop working after first message is send through ethernet.

 

0 Kudos
Reply

1,162 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello,

this is quite complex case, so I can only give some recommendations:

  • Use a debugger to see if USB interrupts are still coming when FreeMASTER tries to communicate (in USB_MCU_INT_HANDLER() in freemaster_usb.c).
  • Also see if the main busy loop task still spins.

If not, I'd start to suspect the network stack keeps triggering an interrupt and will not let other code to run.

  • Try to use FreeMASTER over a simpler interface like UART (over CMSIS-DAP's virtual serial port).
  • Do not use FreeMASTER, but combine the network demo just with basic hello world over USB (hello_world_virtual_com) and test the network application coexistence with a plain terminal communication.

If this also does not work, I'd suspect also potential memory corruption or other more serious issue.

Regards,
Michal

0 Kudos
Reply