cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
beandigital
Scholar
Scholar
988 Views
Registered: ‎04-27-2010

Value assigned wrong

Jump to solution

I am using the LWIP stack with SDK 2018.2. I am trying to get DHCP to work. I have noticed something strange on the following assignmnent

 

ipaddr.addr = echo_netif->ip_addr.addr;

 

echo_netif->ip_addr.addr = 0x0a01a8c0

 

But when it assigns the value to ipaddr.addr it is not correct. I get 0x000a01a8.

Its shifted the value and lost the lower bits. 

Anyone know why? Thanks

 

0 Kudos
1 Solution

Accepted Solutions
beandigital
Scholar
Scholar
893 Views
Registered: ‎04-27-2010

There was a bug in the code that meant it was over writing some values. It seems that caused the address to end up wrong. 

View solution in original post

2 Replies
nanz
Moderator
Moderator
912 Views
Registered: ‎08-25-2009

Hi @beandigital,

 

is your application based on LWIP echo from SDK? If you have done any modifications, can you please shared the codes and also the terminal output to show the results?

 

If this is based on any of our evaluation board, please feel free to send the project over so I could try to reproduce it.


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
beandigital
Scholar
Scholar
894 Views
Registered: ‎04-27-2010

There was a bug in the code that meant it was over writing some values. It seems that caused the address to end up wrong. 

View solution in original post