fill with the magic data... going to try this in place of their radio

init and see if that gets there board working.
This commit is contained in:
Mariano Alvira 2009-04-07 18:52:12 -04:00
parent bd459e187f
commit 5144fe36dd
3 changed files with 22 additions and 3 deletions

View file

@ -405,6 +405,8 @@ typedef union maca_maskirq_reg_tag
void reset_maca(void); void reset_maca(void);
void init_phy(void); void init_phy(void);
void ResumeMACASync(void); void ResumeMACASync(void);
void radio_init(void);
/* Magic data /* Magic data
@ -528,4 +530,3 @@ e.g. 0x80004118 gets 00180012 (MACA_WARMUP)
*/ */
#endif // _MACA_H_ #endif // _MACA_H_

View file

@ -1,5 +1,10 @@
#include "maca.h" #include "maca.h"
/* best format */
#define MAX_DATA 43
const uint32_t addr[MAX_DATA] = { 0x80004118,0x80009204,0x80009208,0x8000920c,0x80009210,0x80009300,0x80009304,0x80009308,0x8000930c,0x80009310,0x80009314,0x80009318,0x80009380,0x80009384,0x80009388,0x8000938c,0x80009390,0x80009394,0x8000a008,0x8000a018,0x8000a01c,0x80009424,0x80009434,0x80009438,0x8000943c,0x80009440,0x80009444,0x80009448,0x8000944c,0x80009450,0x80009460,0x80009464,0x8000947c,0x800094e0,0x800094e4,0x800094e8,0x800094ec,0x800094f0,0x800094f4,0x800094f8,0x80009470,0x8000981c,0x80009828 };
const uint32_t data[MAX_DATA] = { 0x00180012,0x00000605,0x00000504,0x00001111,0x0fc40000,0x20046000,0x4005580c,0x40075801,0x4005d801,0x5a45d800,0x4a45d800,0x40044000,0x00106000,0x00083806,0x00093807,0x0009b804,0x000db800,0x00093802,0x00000015,0x00000002,0x0000000f,0x0000aaa0,0x01002020,0x016800fe,0x8e578248,0x000000dd,0x00000946,0x0000035a,0x00100010,0x00000515,0x00397feb,0x00180358,0x00000455,0x00000001,0x00020003,0x00040014,0x00240034,0x00440144,0x02440344,0x04440544,0x0ee7fc00,0x00000082,0x0000002a };
void init_phy(void) void init_phy(void)
{ {
@ -42,6 +47,13 @@ void reset_maca(void)
} }
void radio_init(void) {
uint32_t i;
for(i=0; i<MAX_DATA; i++) {
*(volatile uint32_t *)(addr[i]) = data[i];
}
}
/* /*
* Do the ABORT-Wait-NOP-Wait sequence in order to prevent MACA malfunctioning. * Do the ABORT-Wait-NOP-Wait sequence in order to prevent MACA malfunctioning.
* This seqeunce is synchronous and no interrupts should be triggered when it is done. * This seqeunce is synchronous and no interrupts should be triggered when it is done.

View file

@ -111,6 +111,7 @@ void main(void) {
for(i=0; i<DELAY; i++) { continue; } for(i=0; i<DELAY; i++) { continue; }
reset_maca(); reset_maca();
radio_init();
init_phy(); init_phy();
/* some kind of sequence in init phy from MACPHY.a dissassmbly */ /* some kind of sequence in init phy from MACPHY.a dissassmbly */
@ -136,8 +137,7 @@ void main(void) {
puts("reserved modem_base\n\r"); puts("reserved modem_base\n\r");
dump_regs(0x80009200, 192); dump_regs(0x80009200, 192);
while(1); // while(1);
command_xcvr_rx(); command_xcvr_rx();
puts("\033[H\033[2J"); puts("\033[H\033[2J");
@ -209,6 +209,9 @@ void main(void) {
{ {
puts("aborted\n\r"); puts("aborted\n\r");
ResumeMACASync(); ResumeMACASync();
command_xcvr_rx();
break; break;
} }
@ -229,6 +232,9 @@ void main(void) {
{ {
puts("status: "); puts("status: ");
put_hex16(status); put_hex16(status);
ResumeMACASync();
command_xcvr_rx();
} }
} }