Good evening, so some days ago I finally got my real crash-start into the ARM world with a pair of SAM R21 xplained pro boards, getting the Peer2Peer LWMesh example working was the fastest thing in the world, and provides instant gratification and amazement with the IC's.
But here comes the doubt train:
For curiosity I tried to read the RSSI value from the radio, and even adding all the source folders again this simple piece of code slapped into the while(1) loop:
char buff; uint8_t rssi = phyReadRegister(PHY_ED_LEVEL_REG); sprintf(buff, "RSSI: %i\r\n", rssi); sio2host_rx((uint8_t)buff, sizeof(buff));
Always gives this error:
Error 1 implicit declaration of function 'phyReadRegister' [-Werror=implicit-function-declaration] C:\Users\Ename\Documents\Atmel Studio\6.2\GETTING-STARTED1\APPS_PEER2PEER1\src\Peer2Peer.c 241 3 APPS_PEER2PEER1 Warning 2 nested extern declaration of 'phyReadRegister' [-Wnested-externs] C:\Users\Ename\Documents\Atmel Studio\6.2\GETTING-STARTED1\APPS_PEER2PEER1\src\Peer2Peer.c 241 3 APPS_PEER2PEER1
I want to understand the LWMesh to use it into some projects, but its not starting well, also is there some sort of intro to the ASF libs, or reading the help files is the best I can do, sometimes I wonder what functions are even provided, pooking around the .h files always answers that but I think there might be a better list of all the functions, which brings me to another question, should I use the ASF or go straight for the bare metal registers?
The interrupt/ISR implementations feel a bit Arduinesque with the use of ASF, I'm more used to the ISR(ISR_vect) from the 8biters, all the callback mumbo-jumbo seems a bit bloated.
Another doubt is, how can I change the initial stack/heap size, a empty project uses 8Kb of RAM, thats 1/4 of the total RAM of the chip, and its such a waste, I have already tried this:
But changing the stack size value and recompiling achieves nothing, is there some other way?
Best regards, and thanks for your help.