This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EMACConfigSet() frame size passed value (ui32RxMaxFrameSize) exceeds REG22 WTO bits field value.

Guru 56218 points

Notice debug is showing a very high value exceeding WTO field [13:0] in EMACWDOGTO REG 22 0x0DC. Setting the maximum frame size entered in EMCAConfigSet() as an decimal integer 2048 byte frames.

Seems the OR of PWE bit shown below may be causing this.

 CCS compiler should convert decimal to pass the value as hex into (ui32RxMaxFrameSize). Some how 2048 ends up being converted to 0x2000.0000 instead of 0x0000.0800.

Why?

    
EMACConfigSet:
// Set the maximum receive frame size. If 0 is passed, this implies // that the default maximum frame size should be used so just turn off // the override. // if(ui32RxMaxFrameSize) { HWREG(ui32Base + EMAC_O_WDOGTO) = ui32RxMaxFrameSize | EMAC_WDOGTO_PWE;

 

 

 

 

  • Or Not!



    The field you report as 0x2000.0000 is - in fact - reporting in binary (Not Hex) is 14 bits wide (as you note) - and exactly equals your 2048!

    You may not be the villain here - may I suggest that you program or order each such display field into "consistent" format.   (we find Hex best - 0x____.____)   That "top" field (reporting 0x0001.0800) likely "lulled you" into expecting (all other fields) would display similarly.   (and - they did NOT!)

    (seems the original Lone Ranger "rode" w/a companion - who may (sometimes) "catch" such things...)

  • See that now and the short PWE binary field lead me to believe WTO was showing 31:0 not 13:0. Not to forget somehow the binary calculator got a lot more 0's appended to that WTO.
  • Thank you, Sir - appreciated.

    I edited just as your neat Verify arrived. (2nd to last para "removes you from the hook" - while suggesting effective, "preventive action" for your use (and others) downstream!

  • BTW: PWE is bit position 16 not 0. Keeping consistent in nomenclature might have avoided the confusion here.

    Edit: Binary display schema.

     

  • Believe instead - as stated - consistency w/in "Field Display" trumps "nomenclature."     You may wish "not" to diminish that (future) preventive action...