2006-09-24 04:46 PM
2006-09-14 03:26 PM
Dear Hich
I'm in hurry to implement RF unit with FM0/NRZI encoding, so l'm anxious to know the HDLC limitations. Can you give me some information about the HDLC limitations? thank you very much, Regards, lisihua2000@tom.com2006-09-18 03:03 AM
Hi,
Could you please tell me what kind of limitations can cause you o lot of worry. With regards, Hich2006-09-18 03:58 PM
I know that REN and TEN bits are swapped on readback. I have got over the limitation in my program. My program can work well with NRZ/NRZI encoding now, but it can't work with FM0/MANCH encoding. I'm not sure the mistake is took by me or str71x. Could you please help me? thank you very much!
here is the code : //============================================================================= #define CODE_NRZ 0 #define CODE_NRZI 1 #define CODE_FM0 2 #define CODE_MANCH 3 void HDLC_Init(unsigned char tx_code,unsigned int tx_bps,unsigned char rx_code,unsigned int rx_bps) { HDLC->GA1 = 0; HDLC->GA0 = 0; HDLC->GAM1 = 0; HDLC->GAM0 = 0; HDLC->PRES = 0; HDLC->POSS = 0; HDLC->TCTL = 0; HDLC->RCTL = 0; HDLC->BRR = 0; HDLC->PRSR = 0; HDLC->TFBCR = 0; HDLC->RFBCR = 0; HDLC->PCR = 0; HDLC->ISR = 0; HDLC->IMR = 0; HDLC->PARH = 0; HDLC->PAMH = 0; HDLC->PARL = 0x00AA; HDLC->PAML = 0x00FF; GPIO_Config (GPIO1, 0x2000, GPIO_IN_TRI_CMOS); GPIO_Config (GPIO1, 0x4000, GPIO_IN_TRI_CMOS); GPIO_Config (GPIO1, 0x8000, GPIO_AF_PP); if((tx_code==CODE_NRZ)||(tx_code==CODE_NRZI)) { HDLC->TCTL = (((unsigned short)1)<HDLC->BRR = ((RCCU_FrequencyValue(RCCU_FCLK)/tx_bps-1) & 0x0FFF); } else //((tx_code==CODE_FM0)||(tx_code==CODE_MANCH) { HDLC->TCTL = (((unsigned short)1)<HDLC->BRR = ((RCCU_FrequencyValue(RCCU_FCLK)/tx_bps/2-1) & 0x0FFF); } if((rx_code==CODE_NRZ)||(rx_code==CODE_NRZI)) { HDLC->RCTL = (((unsigned short)1)<HDLC->PRSR = ((RCCU_FrequencyValue(RCCU_FCLK)/rx_bps-1) & 0x00FF); } else //((tx_code==CODE_FM0)||(tx_code==CODE_MANCH)) { HDLC->RCTL = (((unsigned short)1)<HDLC->PRSR = ((RCCU_FrequencyValue(RCCU_FCLK)/rx_bps/2-1) & 0x00FF); } }2006-09-21 08:08 AM
Hi,
I received an offical answer for ST to the same question. I have attached this draft document. I'm worry to use the HDLC unit for my application whitch is possible similar to your. But in any case I will use STR7. Kind Regards Ioannis2006-09-21 09:30 PM
Dear elcom,
Thank you very much for your reply, I can't find the document you attached. Could you please attach it again or email to me? thank you very much Kind Regards huashilong2006-09-24 05:17 AM
Sorry, hope it is working now.
Kind Regards Ioannis ________________ Attachments : STR71x-HDLC-Errata.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtFM&d=%2Fa%2F0X0000000aKi%2FFBZz7EOJOgMxEAPJBf02nDiWAl_RIzqLZFV85D8x4I8&asPdf=false2006-09-24 04:46 PM
Dear elcom,
My application is for DSRC, I have to change my design now. You save my time equal to save my life. Thank you very much. Kind Regards huashilong