I use Lightweight mesh application on SAM R21 Xplained Pro Evaluation Kit without any problems. Now I want to use it on ATSAMR21B18-MZ210PA. R21 Xplained Pro has ATSAMR21G18A MCU, while ATSAMR21B18-MZ210PA has ATSAMR21E18A MCU. I find it is very difficult to transfer my code used on R21 Xplained Pro to ATSAMR21B18-MZ210PA or create a new lightweight mesh application for ATSAMR21B18-MZ210PA.
I know ATSAMR21G18A and ATSAMR21E18A have different I/O PIN. It looks like Atmel Studio only supports ATSAMR21G18A in Example Project and in ASF for Lightweight mesh application. If I try to use them for ATSAMR21B18/ATSAMR21E18A, it seems that I need change a lot. Is there a good way to do that?
Actually I tried modify the code and configuration. I have many problems. For example, PHY_Init() is stuck at void trx_reg_write(uint8_t addr, uint8_t data). After I check it, I find AT86RFX_SPI for SERCOM4 register is the problem. Can anyone help?.