PN7362 UART transmission problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PN7362 UART transmission problem

ソリューションへジャンプ
3,329件の閲覧回数
thomasbarreto
Contributor I

Hello,

I work on a projet with the PN7362. I try to use the Host Interface, as an UART.

I configured it and I succeeded to receive frames via the Rx pin, but I fail to transmit until now.

I know the EOT interrupt is never generated because the callback function is never called.

I look the Tx Init register and i find the goud values into.

Could you help me with this problem? 

Initialisation :

phhalHif_Config_t s_ConfigNXP_HSUART;

s_ConfigNXP_HSUART.eInterface = E_HIF_HSU; 
s_ConfigNXP_HSUART.sConfig.sHsuConfig.bIsHsuBoot = 0; 
s_ConfigNXP_HSUART.sConfig.sHsuConfig.bEOF = 8; 
s_ConfigNXP_HSUART.sConfig.sHsuConfig.bStopBits = 1; 
s_ConfigNXP_HSUART.sConfig.sHsuConfig.bDummyBytes = 0;
s_ConfigNXP_HSUART.eBufferType = E_BUFFER_FORMAT_FREE; 
s_ConfigNXP_HSUART.bShortFrameLen = 0; 
s_ConfigNXP_HSUART.bStoreErrData = 0; 
s_ConfigNXP_HSUART.bHeaderSize = 0;
s_ConfigNXP_HSUART.bTimeout = 100; 

s_ConfigNXP_HSUART.sConfig.sHsuConfig.bBaudRate = E_HSU_BAUDRATE_38_4K;

phhalHif_Init(&s_ConfigNXP_HSUART, (pphhalHif_Callback_t) &Erreur_Init_UART_Interrupt); 

Transmission :

phStatus_t e = 0;
unsigned char ui_TxBuffer[4] = {'C','H','A','R'};
e = phhalHif_Transmit((uint32_t *)&ui_TxBuffer,sizeof(ui_TxBuffer), (pphhalHif_Callback_t)&ext_SetTxBufferEmptyInterrupt);


if (e == 0x0021)printf("INVALID PARAM");
else if (e== 129)printf("TX ONGOING");
else if (e== 131)printf("TX LOCKED");
else if (e== 133)printf("TX PREFETCH");
else if (e==0x00)printf("SUCCESS");

Thank you for your time.

Regards

0 件の賞賛
返信
1 解決策
2,568件の閲覧回数
thomasbarreto
Contributor I

I found the solution, it was an hardware problem. I didn't use the RTS/CTS flow control, so I had to connect the CTS pin to the ground.

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
2,568件の閲覧回数
giovannizani
Contributor II

I have the same problem with PN7362 and did not find the solution in the attached example. You can help me?


    sHifConfigs.eBufferType = E_BUFFER_FORMAT_FREE; /* E_BUFFER_FORMAT_FREE */
    sHifConfigs.bShortFrameLen = 0 ; // gpkphCfg_EE_HW_HIF->bShortFrameLen;
    sHifConfigs.bStoreErrData = 0 ; // gpkphCfg_EE_HW_HIF->bStoreErrData;
    sHifConfigs.bHeaderSize = 0 ; // gpkphCfg_EE_HW_HIF->bHeaderSize;
    sHifConfigs.bTimeout = 0 ; // gpkphCfg_EE_HW_HIF->bTimeout;
    
    sHifConfigs.eInterface = E_HIF_HSU;
    sHifConfigs.sConfig.sHsuConfig.bIsHsuBoot = 0 ; // gpkphCfg_EE_HW_HIF->bIsHsuBoot;
    sHifConfigs.sConfig.sHsuConfig.bEOF = 8 ; // gpkphCfg_EE_HW_HIF->bEndOfFrame;
    sHifConfigs.sConfig.sHsuConfig.bStopBits = 1 ; //gpkphCfg_EE_HW_HIF->bStopBits;
    sHifConfigs.sConfig.sHsuConfig.bDummyBytes = 3 ; // gpkphCfg_EE_HW_HIF->bDummyBytes;
    sHifConfigs.sConfig.sHsuConfig.bBaudRate = E_HSU_BAUDRATE_9_6K ; //(phhalHif_Hsu_BaudRate_t) gpkphCfg_EE_HW_HIF->bBaudRate;
            
/** Host Interface Initialize */
    PH_USER_ASSERT(
    phhalHif_Init(&sHifConfigs, &phExHif_Hw_Generic_CallBack) == PH_ERR_SUCCESS);

Thanks, Giovanni

0 件の賞賛
返信
2,569件の閲覧回数
thomasbarreto
Contributor I

I found the solution, it was an hardware problem. I didn't use the RTS/CTS flow control, so I had to connect the CTS pin to the ground.

0 件の賞賛
返信
2,568件の閲覧回数
giovannizani
Contributor II

Hi, Thomas

thanks for the solution, I also had to connect the #CTS to the ground.

Unfortunately I did not find the way to disable flowcontrol via firmware, if someone knows the solution would be a good thing for me.

Thanks Giovanni

0 件の賞賛
返信
2,567件の閲覧回数
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hello thomasbarreto

Hope you are doing great, please check the attached project it uses the HSUART to interact with the PN7462 it should not be much different than the one you are using, just as reference.

- Receive UART data at 9600/8/N1 from Host
- Execute the next commands depending on received character from UART:
‘T’ = Run a polling test and return PASS/NO PASS response to host depending if card was detected or not.
‘O’ = Turn RF field on and leave it on.
‘F’ = Turn RF field off.

Have a great day !

Best Regards.

Jonathan

0 件の賞賛
返信