mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-24 07:29:42 +00:00
maybe the modem syn. needs to be set right.
reenabled the uart1-loopback code --- doesn't seem to be working --- strange.
This commit is contained in:
parent
ef276e336c
commit
a940f4db2b
@ -50,6 +50,7 @@ void main(void) {
|
|||||||
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
||||||
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
||||||
|
|
||||||
|
reg(80009000) = 0x00050100;
|
||||||
|
|
||||||
reg(MACA_RESET) = 0x3; /* reset, turn on the clock */
|
reg(MACA_RESET) = 0x3; /* reset, turn on the clock */
|
||||||
for(i=0; i<DELAY; i++) { continue; }
|
for(i=0; i<DELAY; i++) { continue; }
|
||||||
|
@ -50,6 +50,8 @@ void main(void) {
|
|||||||
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
||||||
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
||||||
|
|
||||||
|
reg(80009000) = 0x00050100;
|
||||||
|
|
||||||
reg(MACA_RESET) = 0x3; /* reset, turn on the clock */
|
reg(MACA_RESET) = 0x3; /* reset, turn on the clock */
|
||||||
for(i=0; i<DELAY; i++) { continue; }
|
for(i=0; i<DELAY; i++) { continue; }
|
||||||
reg(MACA_RESET) = 0x2; /* unreset, turn on the clock */
|
reg(MACA_RESET) = 0x2; /* unreset, turn on the clock */
|
||||||
@ -73,7 +75,7 @@ void main(void) {
|
|||||||
while(1) {
|
while(1) {
|
||||||
puts("\033[H");
|
puts("\033[H");
|
||||||
puts("rftest-tx --- " NL);
|
puts("rftest-tx --- " NL);
|
||||||
/*
|
|
||||||
puts("base +0 +4 +8 +c +10 +14 +18 +1c " NL);
|
puts("base +0 +4 +8 +c +10 +14 +18 +1c " NL);
|
||||||
for (i = 0; i < 96; i ++) {
|
for (i = 0; i < 96; i ++) {
|
||||||
if ((i & 7) == 0) {
|
if ((i & 7) == 0) {
|
||||||
@ -85,7 +87,7 @@ void main(void) {
|
|||||||
puts(NL);
|
puts(NL);
|
||||||
}
|
}
|
||||||
puts(NL);
|
puts(NL);
|
||||||
*/
|
|
||||||
|
|
||||||
/* start a sequence */
|
/* start a sequence */
|
||||||
reg(MACA_CONTROL) = 0x00031A03;
|
reg(MACA_CONTROL) = 0x00031A03;
|
||||||
|
@ -31,12 +31,12 @@ void main(void) {
|
|||||||
|
|
||||||
uint8_t c;
|
uint8_t c;
|
||||||
while(1) {
|
while(1) {
|
||||||
*(volatile uint32_t *)UART1_DATA = (uint8_t)'U';
|
// *(volatile uint32_t *)UART1_DATA = (uint8_t)'U';
|
||||||
// if(*(volatile uint32_t*)UR1CON > 0) {
|
if(*(volatile uint32_t*)UR1CON > 0) {
|
||||||
/* Receive buffer isn't empty */
|
/* Receive buffer isn't empty */
|
||||||
/* read a byte and write it to the transmit buffer */
|
/* read a byte and write it to the transmit buffer */
|
||||||
// c = *(volatile uint32_t *)UART1_DATA;
|
c = *(volatile uint32_t *)UART1_DATA;
|
||||||
// *(volatile uint32_t *)UART1_DATA = c;
|
*(volatile uint32_t *)UART1_DATA = c;
|
||||||
// }
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user