So far I got down to Port A initialization.
If I skip that, the ARPs are working.
Any idea why Port A?
What in RCM3000 different from RCM3315 that has to do with Port A?
My socket init was run after this so not sure why that didn’t repurposed Port A if it needed to as suggested in a post.
//set up port I/O
//port A is bi-directional and can be read or written to
WrPortI (SPCR, &SPCRShadow, 0x8C); //port A is aux data bus
The RCM3000 runs at 29.4912MHz and the RCM3315 runs at 44.2368MHz, so they use different GCDR
values. The BIOS sets that register correctly during startup, so there’s no need to include it in your initialization code.
No action.
Your GOCR
initialization actually turns the PCLK output on. Note that when you’re using WrPortI()
, you should use the shadow variable as a starting value and then mask off bits you want to set to 0 (using &
) and then set new bits (using |
). If you’re setting all of the bits, you can just use the value directly. But in many cases, you just want to set specific bits of the register without changing bits that other code may have set.
Understood. Assuming no action needed.
So, if you just want to change just the PCLK bits of GOCR
, you should use GOCRShadow & 0x3F
, which sets the top 2 bits to 00. If you wanted some other value, you could use (GOCRShadow & 0x3F) | 0x80
(which sets the CLK output low).
Understood. Assuming no action needed not to deviate too much from original code.
Looking at the schematic of the RCM3000, you should update your WrPortI()
calls so they don’t modify the following pins (they’re used by the Ethernet interface): PD0, PD1, PE2
Port A is causing my issue. What is on Port A that could break Ethernet?
PD2, PD3, PD6, and PD7 are mentioned on the user’s manual for Ethernet but not connected
At the very least, you want to call your board init routine before initializing the TCP/IP stack, since it will likely fix the I/O configuration for those pins.
I call Socket Init after IO init. Does socket init, initialize the TCP stack and necessary IO?