First of all, I'm not very experienced with Microcontrollers. Though, I'd need some help and hope that you might be able to help me : >...
I'm trying to send bytes to the UEXT peripheral connector using the writeUSART(unsigned char* memPtr, unsigned int length) function. Sadly, I'm not getting it to work.
I'm trying to change the code which works with the USART0 part (meaning you can connect to the RS232 and the byte sending stuff works) to get it to work with the USART1 (UEXT).
I've tried:
- in main.c : sdStart(&SD2, &default_config);
using the &SD2 here instead of &SD1
- in serial_lld.c in function usart_init(void): AT91PS_USART pUSART0 = AT91C_BASE_US1;
instead of AT91C_BASE_US0;
Defines:
Code: Select all
// defines for USART interface.
#define USE_SD_DMA
//#define USE_SD_DMA_INTERRUPT
//#define USE_SD_ENDTX_Interrupt
#define CH_HAL_USE_SERIAL TRUE
#define SD_MODE ( AT91C_US_USMODE_RS485 + AT91C_US_NBSTOP_1_BIT + AT91C_US_PAR_EVEN + AT91C_US_CHRL_8_BITS + AT91C_US_CLKS_CLOCK )
#define SD_BAUDRATE 115200
#define SD_DMA_BUFFERSIZE 12800
#define SD_DMA_SENDBUFFERSIZE 50
#define SD_MAX_RECEIVEBUFFER 4Hardware being used:
Microcontroller: SAM7-EX256 Rev. C - https://www.olimex.com/dev/sam7-ex256.html
for the UEXT: MOD-USB-RS232 - https://www.olimex.com/dev/mod-usb-rs232.html (do jumpers need to be set? I wouldn't know how (by soldering??))
I'd be thankful for any help!