Hi my friends!
I design a board with Atmel chip (SAM3S8B), and I want to use keil USBHID for that. I went to keil\ARM\Boards\Atmel\SAM3S-EK\USBHID but this sample is for using Atmel (SAM3S4C).
So I began to change it, those changes are : 1 - first in target option->device I changed device to SAM3S8B and in target option->target I changed xtal(MHz) to 18.432 because I used that according to atmel datasheet for this device.
2 - In SAM3S.H I changed
#include "AT91SAM3S4.h"
to
#include "SAM3S8.h" that is in the same address as before headerfile
3 - After that, I compile it and I get these errors :
usbhw_SAM3S.c(66): error: #20: identifier "UDP_CSR_STALLSENTISOERROR" is undefined usbhw_SAM3S.c(83): error: #20: identifier "UDP_CSR_STALLSENTISOERROR" is undefined usbhw_SAM3S.c(262): error: #20: identifier "UDP_FADDR_FADD" is undefined usbhw_SAM3S.c(373): error: #20: identifier "UDP_CSR_STALLSENTISOERROR" is undefined usbhw_SAM3S.c(524): error: #20: identifier "UDP_FRM_NUM_FRM_NUM" is undefined usbhw_SAM3S.c(626): error: #20: identifier "UDP_CSR_STALLSENTISOERROR" is undefined usbhw_SAM3S.c(627): error: #20: identifier "UDP_CSR_EPTYPE" is undefined
I found that these identifiers were in "AT91SAM3S4.h" that with changing to "SAM3S8.h" are missing.
these errors are in usbhw_SAM3S.c, so I added these lines in beginning of that :
#define UDP_CSR_STALLSENTISOERROR UDP_CSR_STALLSENT #define UDP_FADDR_FADD UDP_FADDR_FADD_Msk #define UDP_FRM_NUM_FRM_NUM UDP_FRM_NUM_FRM_NUM_Msk #define UDP_CSR_EPTYPE UDP_CSR_EPTYPE_Msk
So the code compiled without any error, but that didn't work correctly when I program board .
anyone know any changes that are need for this aim? please help me.
thanks for your attention.