PN7362 UART transmission problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7362 UART transmission problem

Jump to solution
2,618 Views
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 Kudos
Reply
1 Solution
1,857 Views
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.

View solution in original post

0 Kudos
Reply
4 Replies
1,857 Views
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 Kudos
Reply
1,858 Views
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 Kudos
Reply
1,857 Views
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 Kudos
Reply
1,857 Views
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 Kudos
Reply