1 delete UCP_API_JESD_PlatformSetup() and UCP_API_RFIC_CellInit() in drv_init;

2 call UCP_API_RFIC_CellInit() in main
This commit is contained in:
liweihua 2023-07-24 19:59:22 +08:00
parent 25905f4b4b
commit ec514f10e5
5 changed files with 49 additions and 17 deletions

View File

@ -29,6 +29,10 @@ int32_t test_case(uint32_t argc, int32_t* argvp);
extern OSP_STATUS osp_init();
extern uint8_t osp_sw_queue_init();
#ifdef ENABLE_JESD_TEST
extern int32_t UCP_API_RFIC_CellInit(void);
#endif
#define MAX_PARA_NUM 4
int32_t main(int32_t argc, char* argvp[])
@ -42,6 +46,9 @@ int32_t main(int32_t argc, char* argvp[])
CPU_SET(4,&mask);
sched_setaffinity(0,sizeof(cpu_set_t),&mask);
#ifdef ENABLE_JESD_TEST
UCP_API_RFIC_CellInit();
#endif
osp_init();
drv_init();

View File

@ -9,11 +9,6 @@
#include "arm_csu.h"
#include "ucp_printf.h"
#ifdef ENABLE_JESD_TEST
extern void UCP_API_JESD_PlatformSetup (void);
extern int32_t UCP_API_RFIC_CellInit(void);
#endif
int32_t g_drv_mem_fd = -1;
uint32_t *g_stc_regs_ptr = NULL; //0x08568000
@ -60,13 +55,6 @@ int32_t init_stc()
int32_t drv_init(void)
{
#ifdef ENABLE_JESD_TEST
UCP_API_JESD_PlatformSetup();
UCP_API_RFIC_CellInit();
//UCP_API_RFIC_CellSetup(2575770000u, 2575770000u, 100000000u, 0);
usleep(100000);
#endif
if(0 != arm_csu_init())
{
UCP_PRINT_ERROR("Init arm csu error!!");

@ -1 +1 @@
Subproject commit 8ea437815106d50f2230e0b3989f7f7174ac0fed
Subproject commit 99d6653cd9acb4b2797ec3c36252f0c80dcf0895

@ -1 +1 @@
Subproject commit 7bd0c4a6b87b70cf28b0c47eea74b731c9e90e38
Subproject commit 7908793098da2a3fcc5da3f3f2831c84fe4947f7

View File

@ -35,6 +35,30 @@ typedef enum ucp_jesd_States
UCP_JESD_STATE_RUN = 0x40
} ucp_jesd_States_e;
/**
* \brief Data structure to ape working step
*/
typedef enum ucp_jesd_ApeWorkStep
{
UCP_JESD_APE_POWERONRESET = 0x00,
UCP_JESD_APE_CLOCKGENRUN = 0x01,
UCP_JESD_APE_CELLRUN = 0x02,
} ucp_jesd_ApeWorkStep_e;
/**
* \brief Data structure to contrl pins of rf's trx
*/
typedef struct ucp_jesd_TrxGpio {
uint8_t ch0_tx_gpio_index;
uint8_t ch0_rx_gpio_index;
uint8_t ch1_tx_gpio_index;
uint8_t ch1_rx_gpio_index;
uint8_t ch2_tx_gpio_index;
uint8_t ch2_rx_gpio_index;
uint8_t ch3_tx_gpio_index;
uint8_t ch3_rx_gpio_index;
} ucp_jesd_TrxGpio_t;
/**
* \brief Data structure to hold digital clock settings
*/
@ -99,13 +123,25 @@ typedef struct ucp_jesd_Init
extern uint32_t UCP_API_JESD_Version(void);
/**
* \brief Sets up the ucp4008 jesd module's working environment
* \brief Sets up the ape work step
*
* \param void
* \param step
* UCP_JESD_APE_POWERONRESET: when jesd reset or power up, set this value
* UCP_JESD_APE_CLOCKGENRUN: when clock gen chip sets up, set this value
* UCP_JESD_APE_CELLRUN: when cell and trx set up, set this value
*
* \retval none.
*/
extern void UCP_API_JESD_PlatformSetup (void);
extern void UCP_API_JESD_ApeWorkStep(ucp_jesd_ApeWorkStep_e step);
/**
* \brief Sets up the gpios of tx and rx
*
* \param setting
*
* \retval none.
*/
extern void UCP_API_JESD_TrxGpioSetup (ucp_jesd_TrxGpio_t *gpio);
/**
* \brief Sets up the ucp4008 jesd's para setting
@ -139,3 +175,4 @@ extern void UCP_API_JESD_CellDelete (void);
#endif
#endif /* #ifndef UCP_API_JESD_H_ */