| || |
|Nov 19, 2007|
|Because of increasing interest to use AR1688 UART pins for non-standard VoIP applications, we added UART software support in current 0.25 test software.
The UART in AR1688 is the simplest, only a RX pin and a TX pin, no hardware flow control nor status pins. Hardware 8 level by 8 bits FIFO are used to buffer receiving and sending data. There is 0.16% hardware clock error with all baudrate because of PLL limitation.
UART software can be compiled using OEM_UART option. The 2 UART pins are already used in ADC keys (AR168F/AR168G/GF302/YWH201), 5x5 keys (GP1266) and 5x6 keys (AR168K), we need to disable all those keys when using UART.
The UART is currently configured as 19200bps baudrate, 8 bits data, 1 bit stop and none-parity. Can be configured up to 115200bps if necessary.
When receiving data, Z80 will be interrupted when receiving FIFO is half full, we will read all available data in a 255 bytes circle buffer and wait for main loop to handle the data. We avoid to be in UART interrupt routine as much as we can to prevent it slowing done DSP by blocking Z80 DSP interrupt.
When sending, no interrupt is used, we will put all sending data into another 255 bytes circle buffer and try to write TX FIFO until full whenever we can, both in sending data function and in main loop. We use 255 bytes sending buffer because we do not hope to poll until all data sent out, to avoid blocking main loop to handle other more critical tasks like RTP traffic.
There is no receiving or sending data error report to upper lever software, application software must handle data check and necessary re-transmission for reliable data exchange.
We implemented a "string" based UART communication example in uart.c, without any error check, using '\0' as separator for data groups over UART. To ensure data can be received as soon as sent, we actually added 4 extra '\0' in each sent string because the Z80 interrupt will only come when FIFO half full.
Comments for this page:
firstname.lastname@example.org on 2010-12-22 06:20:54 220.127.116.11
I tried to connect the module after finishing a PCB connecting the required supplies and GPIO7 to vcc3 via 10k ohm resistor -- the reset circuit for the module and the network connections to rj45 jack
then i tried to connect it to cross cable to my PC the network connection notification appear to be connected at 10Mbps
when using the manager.exe under SDCC/bin directory first run it then power up the module >> there are no output indicate that what ip is the default one so i can use it and the http to reconfigure the module with static ip
what can i do now
Woodyposted on 2010-12-23 11:21:43 18.104.22.168
The default is using DHCP to get an IP address from a DHCP server.
If you really have to use a crossover cable, you can set your PC to IP address like 192.168.1.201, set AR168M in safe mode, and use sdcc\bin\getopt.bat and setopt.bat to set it to a static ip like 192.168.1.202, disable DHCP by set iptype=0.