for your ATMega328PB board (since board = uno or board = nanoatmega328 use a ATMega328P, not a ATMega328PB), you have access to the SPI and SPI1 libraries of the used Arduino core (“MiniCore”) at MiniCore/avr/libraries at master · MCUdude/MiniCore · GitHub.
From a first glance, the SPI and SPI1 libraries use seperate objects to store their data and only write to the SPI0 / SPI1 registers, so there should be no problem. Since you are experiencing some kind of bug though (no words on the symptoms though), you should be opening an issue in Issues · MCUdude/MiniCore · GitHub.
Just so we’re clear on what’s expected, what you want to see is both SPI0 and SPI1 MISO/MOSI/SCLK/CS lines being active at the same point in time right?
But all the transaction functions are blocking for the CPU.
Thanks for pointing out the blocking of the CPU.
Is there any way to work around this issue?
Do you have any pointers on where my code is blocking the CPU?
Disclaimer: I am not aware of how the ethernet packets are sent as I am using the Ethernet library directly available for W5100 module. I think if we can know the duration of the packets.