- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
First you can see the figure.
Source Port variable data type is unsigned short so the next destport variable address is 0x20000D84.
destport variable datatype is also unsigned short but next seqNo variable address is not 0x20000D86 but 0x20000D88.
It is Psoc creator bug or my fault.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum!
It is not a fault, it is a feature 😉
You are probably using a 32-bit Arm M0 or M3 core which is a PSoC4 / PSoC5 chip.
Arm requires to have 32-bit variables on a dword boundary (dividable by four), in this case not on 0x...86, but 0x...88 location.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum!
It is not a fault, it is a feature 😉
You are probably using a 32-bit Arm M0 or M3 core which is a PSoC4 / PSoC5 chip.
Arm requires to have 32-bit variables on a dword boundary (dividable by four), in this case not on 0x...86, but 0x...88 location.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your valuable replay.
But I have read TCP Header so data comes in bytes format. when i have read Sequence no from TCP header i have get the data from 0x..88 but actually store from 0x..86 location so i have get complete wrong data onward and due to wrong control bits my TCP connection not establish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When defining data in a struct you may use the "packed" attibute. Look at this appnote and search for "packed"
Bob