Member | Action | Date |
---|---|---|
![]() |
Posted
Si1064/Si4455 Power configuration on
Forum
I have tried to program the si1064 device to let it output different powers CW in the same project.But I have came up with very very strange questions.Now look at this below:
according to the wds configuration ,i have generated two kinds of powers in the radio_config.h.And I put the parameters into the arrays.this is the radio_config.h
radio_config.h //RF_WRITE_TX_FIFO 915MHz 0.94dBm #define RF_EZCONFIG_CHECK_POWER0 0x19, 0x92, 0x44
this is two kinds of power arrays: #define RADIO_CONFIGURATION_DATA_ARRAY_POWER0 { \ #define RADIO_CONFIGURATION_DATA_ARRAY_POWER1 { \ #define RADIO_CONFIGURATION_DATA_POWER0 { \ #define RADIO_CONFIGURATION_DATA_POWER1 { \
1.output power0 ,it worked OK .next I have changed this in radio.c //Now .only to use Power0 radio.h modifined this: extern const SEGMENT_VARIABLE_SEGMENT_POINTER(p0RadioConfiguration, tRadioConfiguration, SEG_CODE, SEG_CODE); extern const SEGMENT_VARIABLE(Radio_Configuration_Data_Array_POWER0[], U8, SEG_CODE);
radio .c call the fuctions: /* Load radio configuration */// main.c call the fuctions // Start Transmitting CW
2.output power1 like this below ,it also worked OK .next I have changed this in radio.c //Now .only to use Power0 radio.h modifined this: extern const SEGMENT_VARIABLE_SEGMENT_POINTER(p1RadioConfiguration, tRadioConfiguration, SEG_CODE, SEG_CODE); extern const SEGMENT_VARIABLE(Radio_Configuration_Data_Array_POWER1[], U8, SEG_CODE);
radio .c call the fuctions: /* Load radio configuration */// main.c call the fuctions // Start Transmitting CW
3.But when I add both definetions like this in the radio.c and radio .h like this below .it can compile succeed .But it didn't work .very very strange radio.C modifined like this
radio.h modifined like this extern const SEGMENT_VARIABLE_SEGMENT_POINTER(p0RadioConfiguration, tRadioConfiguration, SEG_CODE, SEG_CODE); extern const SEGMENT_VARIABLE_SEGMENT_POINTER(p1RadioConfiguration, tRadioConfiguration, SEG_CODE, SEG_CODE);
call the functions like this: radio .c call the fuctions: /* Load radio configuration */// main.c call the fuctions // Start Transmitting CW
Result:.it can compile succeed .But it didn't work ,When I use the Si1064 kit to debug.It touch the SMBUS interrupt:it leaves this pointer ******************************************************************************/
you can see it .I just only add some difinetions in the radio.c and radio.h .it just did not work .it is too strange.Now I post my codes to the attachments. Looking for your help! |
Oct 28 2017, 3:00 PM |
![]() |
Posted
Questions about si1064 on
Forum
Hello! Sorry to trouble you,Now I am a newer learning the Si1064,And I have some questions about this kit Question1:I have use the WDS tool kit to download an Unmodulated carrier project,And generated the project in the silicon IDE, but I have found 5 projects in the bin file folder,these are : 1:LCDBB_F930_Si4x55_UnmodulatedCarrier_Keil IDE project 2: RFstick_F930_Si4x55_UnmodulatedCarrier_Keil IDE project 3: WMB912_Si106x_Si4x55_UnmodulatedCarrier_Keil IDE project 4 .WMB912_Si108x_Si4x55_UnmodulatedCarrier_Keil IDE project 5. WMB930_F930_Si4x55_UnmodulatedCarrier_Keil IDE project That's confusing me,when I use the WDS tool kit .I remembered I only choose to select the Si1064 platform,Why there are 5 projects in different platform version.
Question2:when I open the WMB912_Si106x_Si4x55_UnmodulatedCarrier_Keil IDE project,I have found many experssions like this:
#if ((defined SILABS_PLATFORM_RFSTICK) || (defined SILABS_PLATFORM_LCDBB)) P0SKIP = (~M_P0_UART_TX) & (~M_P0_UART_RX) & (~M_P0_I2C_SCL) & (~M_P0_I2C_SDA); //skip all on port, but UART & SMBus #if (defined SILABS_MCU_DC_EMIF_F930) >>>>> there are many like these experssions above in the main.c or other files, that is to say ,Only you have defined the specified platform ahead,these codes can be programed then. Now I use the Si1064 platform,But I have not found Where the Si1064 platform or the SILABS_PLATFORM_WMB912 is defined ahead ,I almost found all header files ,But I can not found where it is defined specifiy,all I have found just like this: 1:elif (defined SILABS_PLATFORM_WMB912) or if (defined SILABS_PLATFORM_WMB912) and so on , They are not defined specifiy ahead,that is why?Where are they defined for a specified platform? |
Oct 28 2017, 2:54 PM |
![]() |
Posted
Si4432 direct transmit a Unmodulated Carrier on
Forum
I have configured the register RF4432_WriteReg(0x71, 0x00); //write 0x0000 0000 to the Modulation Mode Control 2 register Unmodulated Carrier mode
but i have found the output signal sees to be modulated, what is wrong with my configurations? |
Oct 28 2017, 2:53 PM |
![]() |
Replied
to
SI4432 OOK direct mode demodulation
谢谢您,我下来试试看 |
Oct 28 2017, 2:52 PM |
![]() |
Posted
SI4432 OOK direct mode demodulation on
Forum
目前想通过Si4432实现一个直接模式调制的例子,但是一直木有成功,求大神能够提供一份直接调制的例程,OOK,GFSK,或者FsK的都行,希望大神帮忙,发送至邮箱320959100@qq.com,谢谢了 |
Oct 28 2017, 2:52 PM |
![]() |
Posted
How to use Si4432 direct transmit a Unmodulated Carrier on
Forum
I find the Si4432 can produce the Unmodulated Carrier signal, I want to produce a stable frequency unmodulated Carrier signal and transmit it,there are some questtions about it ,how to comfigure these registers in si4432,shall I need to configure it in FiFo Mode or Direct mode ?,How to configure the frequency of the unmodulated Carrier signal? Is there an example that I can refer to? Looking for your help ,Thank you
|
Oct 28 2017, 2:53 PM |
![]() |
Posted
Si4432 OOK modulation on
Forum
Looking for help: I want to realize a OOK modulation through the Si4432 ,but I can not find an example about this kind of modulation,is there an example that I can refer to? I hope that someone can help me or give me some tips about how to configure the registers both in FiFO mode or in direct mode .
|
Oct 28 2017, 2:53 PM |
![]() |
Replied
to
Si1064_PCA0_Capture_Input
I am very very thanks for your reply,I have done just as your suggestions,here are the results:
From these Pictures,you can find almost every registers about the PCA is Correct,Both ihe IO Ports and PCA configure registers.The P01 and P00 can detect the CW purse,But the interrupt only triggered once. I hope that you can verify this project into the Si1064-915-DK board in the attachment.This is very important!!! I am looking forward your reply! Thank You! Benjamin
|
Oct 28 2017, 2:19 PM |
![]() |
Replied
to
Si1064_PCA0_Capture_Input
Hi yucheng: Thanks for your reply,I am quietly sure I have configured as you have said,But the interrupt only triggered once,That is very funny,You can find the project in the attachment.Also When I debuging the Si1064-915-DK board,I have found these values has written to the registers correctly.The 500us CW pulse can be monitored in the P0.1 pin when I use the oscilloscope to detect it! I hope that you can verify this problem as soon as posssible!and there are part of codes below! You can find the project in the attachment. /*! @file main.c * @brief The main.c file of the CW Transmit demo for Si4455 devices. * * Contains the initialization of the MCU & the radio. * @n The main loop controls the program flow & the radio. * * @b CREATED * @n Silicon Laboratories Hungary Ltd. * * @b COPYRIGHT * @n Silicon Laboratories Confidential * @n Copyright 2012 Silicon Laboratories, Inc. * @n http://www.silabs.com * */ #include "..\bsp.h" #include <stdio.h> /*------------------------------------------------------------------------*/ /* Local Macros */ /*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/ /* Local variables */ /*------------------------------------------------------------------------*/ //PCA Test #define SYSCLK 24500000L // Internal oscillator frequency in Hz #define BAUDRATE 9600 // Baud rate of UART in bps #define T0_CLOCKS 245L // Use 245 clocks per T0 Overflow // (245 = 10 us) #define T2_RELOAD_CLOCKS 6125 // SYSCLKs per 1/2 cycle square wave // (245 = 10 us) static unsigned int current_capture_value, previous_capture_value; static unsigned int capture_period; unsigned int t; /*------------------------------------------------------------------------*/ /* Local function prototypes */ /*------------------------------------------------------------------------*/ void vPlf_McuInit (void); void vInitializeHW (void); //PCA Test void PCA0_Init (void); void Delay(void); void Sendpulse(void); void TestTimerInit (void); void Init_UART(void); INTERRUPT_PROTO (PCA0_ISR, INTERRUPT_PCA0); /*------------------------------------------------------------------------*/ /* Function implementations */ /*------------------------------------------------------------------------*/ /** \fn void main(void) * \brief The main function of the demo. *PCA Capture_test: *P01 Output CW,P00 CEX0 Capture Input, P01connectP00 * \todo Create description */ void main(void) { // Initialize the Hardware and Radio vInitializeHW(); #ifdef SILABS_LCD_DOG_GLCD /* Initialize graphic LCD */ vLcd_InitLcd(); /* Set logo location to center */ bLcd_LcdSetPictureCursor(bLcd_Line1_c, 35u); /* Draw SiLabs logo */ vLcd_LcdDrawPicture(silabs66x30); #endif // Start Transmitting CW vRadio_StartTx(pRadioConfiguration->Radio_ChannelNumber, NULL); #ifdef SILABS_PLATFORM_WMB912 /* Switch on LED1 */ vCio_SetLed(0x01); #else /* Switch on LED2 */ LED1 = ILLUMINATE; #endif Init_UART(); PCA0_Init (); TestTimerInit (); EA=1; printf("PCA Capture Test:\n"); while (TRUE) { // Endless loop // check to see if Timer2 overflowed if (TF2H) { RF_NIRQ = !RF_NIRQ; // Toggle test pin P01 TF2H = 0; // Clear T2 overflow } } } /** * Calls the init functions for the used peripherals/modules * * @note Should be called at the beginning of the main(). * */ void vInitializeHW(void) { // Initialize the MCU peripherals vPlf_McuInit(); // Initialize the Radio vRadio_Init(); } /** \fn void MCU_Init(void) * \brief Initializes ports of the MCU. * * \return None * * \note It has to be called from the Initialization section. * \todo Create description */ void vPlf_McuInit(void) { U16 wDelay = 0xFFFF; /* disable watchdog */ PCA0MD &= (~M_WDTE);//M_WDTE:0x40 //PCA0MD=0x00; /* Init Internal Precision Oscillator (24.5MHz) */ SFRPAGE = LEGACY_PAGE; FLSCL = M_BYPASS;//M_WDTE:0x40 OSCICN |= M_IOSCEN; // p7: Internal Prec. Osc. enabled CLKSEL = 0x00; // Int. Prec. Osc. selected (24.5MHz) /************************************************Si1064 Uncompiled start*******************************************************************/ #if ((defined SILABS_PLATFORM_RFSTICK) || (defined SILABS_PLATFORM_LCDBB)) P0MDOUT = M_P0_UART_TX; //PBs: P0.0-P0.3 (same as RF_GPIO0-3) used as input P1MDOUT = M_P1_SPI1_SCK | M_P1_SPI1_MOSI | M_P1_RF_NSEL | M_P1_RF_PWRDN; P2MDOUT = M_P2_LED1 | M_P2_LED2 | M_P2_LED3 | M_P2_LED4 | M_P2_BZ1; #if (defined SILABS_PLATFORM_LCDBB) P1MDOUT |= M_P1_LCD_NSEL | M_P1_LCD_A0; #endif P0SKIP = (~M_P0_UART_TX) & (~M_P0_UART_RX) & (~M_P0_I2C_SCL) & (~M_P0_I2C_SDA); //skip all on port, but UART & SMBus P1SKIP = (~M_P1_SPI1_SCK) & (~M_P1_SPI1_MISO) & (~M_P1_SPI1_MOSI); //skip all on port, but SPI1 P2SKIP = (~M_P2_BZ1); //skip all on port, but buzzer with PCA CEX0 #elif ((defined SILABS_MCU_DC_EMIF_F930) || (SILABS_MCU_DC_EMIF_F930_STANDALONE)) #if (defined SILABS_MCU_DC_EMIF_F930) // Init master hw SPI interface (SCK clock: 2.45MHz) // Init SPI0 (LCD) SPI0CFG = M_MSTEN0; //p6: SPI0 enable master mode SPI0CN = M_SPI0EN; //p1: SPI0 enable SPI0CKR = 0x04; //fSCK = SYSCLK / 10 #endif P0MDOUT = M_P0_UART_TX | M_P0_LED1 | M_P0_LED2 | M_P0_LED3 | M_P0_LED4; P1MDOUT = M_P1_SPI1_SCK | M_P1_SPI1_MOSI | M_P1_RF_NSEL; P2MDOUT = M_P2_RF_PWRDN; #if (defined SILABS_MCU_DC_EMIF_F930) P1MDOUT |= M_P1_SPI0_SCK | M_P1_SPI0_MOSI; P2MDOUT |= M_P2_LCD_NSEL | M_P2_LCD_A0; #endif P0SKIP = (~M_P0_UART_TX) & (~M_P0_UART_RX) ; //skip all on port, but UART P1SKIP = (~M_P1_SPI1_SCK) & (~M_P1_SPI1_MISO) & (~M_P1_SPI1_MOSI); //skip all on port, but SPI1 P2SKIP = (~M_P2_I2C_SCL) & (~M_P2_I2C_SDA); //skip all on port, but SMBus #if (defined SILABS_MCU_DC_EMIF_F930) P1SKIP &= (~M_P1_SPI0_SCK) & (~M_P1_SPI0_MISO) & (~M_P1_SPI0_MOSI); //do not skip SPI0 for LCD #endif #elif (defined SILABS_PLATFORM_WMB930) /* Port IN/OUT init */ P0MDOUT = 0x80; P1MDOUT = 0xF5; P2MDOUT = 0x49; P0SKIP = 0xCF; P1SKIP = 0x18; P2SKIP = 0xB9; /****************************************************End************************************************************/ #elif (defined SILABS_PLATFORM_WMB912) /* Port IN/OUT init */ /* P0: 2,3,4,6,7 push-pull */ /* P1: 0,2,3,6 push-pull */ /* P2: no push-pull */ //P0MDOUT = 0xDC; P0MDOUT = 0xDE;//PCA test:P0: 1,2,3,4,6,7 push-pull P01output CW pulse P1MDOUT = 0x4D; /* P0: 0,1,2,3,6,7 skipped */ /* P1: 3,6 skipped */ /* P2: 7 skipped */ //P0SKIP = 0xCF;//0x1100 1111(UART:P04 P05 not SKIP) P0SKIP = 0xCE;//test:0x1100 1110(UART:P04 P05 CEX0 P00 not SKIP) P1SKIP = 0x48; /* // Set SMBUS clock speed Set115200bps_24MHZ5; //Start Timer1 TR1 = 1; // Initialize SMBus vSmbus_InitSMBusInterface(); */ #else #error TO BE WRITTEN FOR OTHER PLARFORMS! #endif P0MDIN = 0xFF; // All pin configured as digital port P1MDIN = 0xFF; // All pin configured as digital port #if !(defined SILABS_PLATFORM_WMB912) P2MDIN = 0xFF; // All pin configured as digital port #endif /* Set Drive Strenght */ SFRPAGE = CONFIG_PAGE; P0DRV = 0x00; P1DRV = 0x00; #if !(defined SILABS_PLATFORM_WMB912) P2DRV = 0x00; #endif SFRPAGE = LEGACY_PAGE; /* Crossbar configuration */ //XBR0 = M_URT0E | M_SMB0E; //p0: UART enabled on XBAR,M_URT0E:0x01 (Tx:P04,RxP05);M_SMB0E:0x04 //XBR1 = M_SPI1E ; //p6: SPI1 enabled on XBAR //PCA Test XBR0 = M_URT0E; //p0: UART enabled on XBAR,M_URT0E:0x01 (Tx:P04,RxP05);M_SMB0E:0x04 // XBR1 = M_SPI1E|0x01; //p6: SPI1 enabled on XBAR PCA enabled on CEX0->P00 XBR1 = 0x41; //p6: SPI1 enabled on XBAR PCA enabled on CEX0->P00 #if ((defined SILABS_PLATFORM_RFSTICK) || (defined SILABS_PLATFORM_LCDBB)) XBR1 |= (1 << BF_PCA0ME_0); //p0: PCA CEX0 enabled on XBAR #elif(defined SILABS_MCU_DC_EMIF_F930) XBR0 |= M_SPI0E ; //p6: SPI1 enabled on XBAR #elif (defined SILABS_MCU_DC_EMIF_F930_STANDALONE) #elif (defined SILABS_PLATFORM_WMB930) XBR1 |= (1 << BF_PCA0ME_0); //p0: PCA CEX0 enabled on XBAR XBR0 |= M_SPI0E; #elif (defined SILABS_PLATFORM_WMB912) #else #error TO BE WRITTEN FOR OTHER PLARFORMS! #endif XBR2 = M_XBARE; //p6: XBAR enable M_XBARE:0x40 /* latch all inputs to '1' */ P0 = ~P0MDOUT; P1 = ~P1MDOUT; #if !(defined SILABS_PLATFORM_WMB912) P2 = ~P2MDOUT; #endif /* set all output to its default state */ LED1 = EXTINGUISH; #if !(defined SILABS_PLATFORM_WMB912) LED2 = EXTINGUISH; LED3 = EXTINGUISH; LED4 = EXTINGUISH; #endif RF_NSEL = TRUE; RF_PWRDN = FALSE; /* SPI1 & SPI0 Config & Enable */ SPI0CFG = 0x40; SPI1CFG = 0x40; #if !(defined SILABS_PLATFORM_WMB912) SPI0CN = 0x01; #else SPI0CN = 0x00; #endif SPI1CN = 0x01; SPI0CKR = 0x0B; SPI1CKR = 0x0B; /* De-select radio SPI */ vSpi_SetNsel(eSpi_Nsel_RF); #if ((defined SILABS_LCD_DOG_GLCD) || (defined SILABS_MCU_DC_EMIF_F930) || (defined SILABS_PLATFORM_WMB)) /* De-select LCD SPI */ vSpi_SetNsel(eSpi_Nsel_LCD); LCD_A0 = FALSE; #endif /* Startup delay */ for (; wDelay; wDelay--) ; } void Init_UART(void) { /*******************************UART Test ***************************************************/ SCON0 = 0x10; // SCON0: 8-bit variable bit rate // level of STOP bit is ignored // RX enabled // ninth bits are zeros // clear RI0 and TI0 bits #if (SYSCLK/BAUDRATE/2/256 < 1) TH1 = -(SYSCLK/BAUDRATE/2); CKCON &= ~0x0B; // T1M = 1; SCA1:0 = xx CKCON |= 0x08; #elif (SYSCLK/BAUDRATE/2/256 < 4) TH1 = -(SYSCLK/BAUDRATE/2/4); CKCON &= ~0x0B; // T1M = 0; SCA1:0 = 01 CKCON |= 0x01; #elif (SYSCLK/BAUDRATE/2/256 < 12) TH1 = -(SYSCLK/BAUDRATE/2/12); CKCON &= ~0x0B; // T1M = 0; SCA1:0 = 00 #else TH1 = -(SYSCLK/BAUDRATE/2/48); CKCON &= ~0x0B; // T1M = 0; SCA1:0 = 10 CKCON |= 0x02; #endif TL1 = TH1; // Init Timer1 TMOD &= ~0xf0; // TMOD: timer 1 in 8-bit autoreload TMOD |= 0x20; TR1 = 1; // START Timer1 TI0 = 1; // Indicate TX0 ready /**********************************************************************************/ } /************************************PCA Test*************************************************/ void Delay(void) { SEGMENT_VARIABLE(Delay, U16, SEG_DATA) ; //for(Delay = 0u;Delay<40;Delay++);//120us for(Delay = 0u;Delay<400;Delay++);//120us } /* void Sendpulse(void) { RF_NIRQ=0; Delay(); RF_NIRQ=1; Delay(); } */ void TestTimerInit (void) { CKCON |= 0x10; // Use SYSCLK to clock Timer2 TMR2RL = -(int)T2_RELOAD_CLOCKS; // Set up Timer 2 reload rate TMR2 = -(int)T2_RELOAD_CLOCKS; // Preload timer TMR2CN = 0x04; // Timer 2 run in 16b auto-reload } void PCA0_Init (void) { // Configure Timer 0 for 8-bit auto-reload mode, using SYSCLK as time base TMOD &= 0xF0; // Clear all T0 control bits TMOD |= 0x02; // 8-bit auto-reload timer CKCON |= 0x04; // T0 uses SYSCLK TH0 = (unsigned char) -T0_CLOCKS; // Set up reload value TL0 = (unsigned char) -T0_CLOCKS; // Set up initial value // Configure PCA time base; overflow interrupt disabled PCA0CN = 0x00; // Stop counter; clear all flags PCA0MD = 0x04; // Use Timer 0 as time base PCA0CPM0 = 0x21; // Module 0 = Rising Edge Capture Mode // enable CCF flag. EIE1 |= 0x10; // Enable PCA interrupts // Start PCA counter CR = 1; TR0 = 1; // Start Timer 0 } //----------------------------------------------------------------------------- // PCA0_ISR //----------------------------------------------------------------------------- // // Return Value : None // Parameters : None // // This is the ISR for the PCA. It handles the case when a capture occurs on // channel 0, and updates the variables to reflect the new capture information. // //----------------------------------------------------------------------------- INTERRUPT(PCA0_ISR, INTERRUPT_PCA0) { //static unsigned int current_capture_value, previous_capture_value; //static unsigned int capture_period; if (CCF0) // If Module 0 caused the interrupt { CCF0 = 0; // Clear module 0 interrupt flag. t++; // Store most recent capture value current_capture_value = PCA0CP0; // Calculate capture period from last two values. capture_period = current_capture_value - previous_capture_value; // Update previous capture value with most recent info. previous_capture_value = current_capture_value; } else // Interrupt was caused by other bits. { PCA0CN &= ~0x86; // Clear other interrupt flags for PCA } } /************************************PCA Test*************************************************/ #ifdef SDCC /** * \brief External startup function of SDCC. * * It performs operations * prior static and global variable initialization. * Watchdog timer should be disabled this way, otherwise it * can expire before variable initialization is carried out, * and may prevent program execution jumping into main(). * * \param None * \return None */ void _sdcc_external_startup(void) { PCA0MD &= ~0x40; // Disable Watchdog timer } #endif Thanks Benjamin
|
Oct 28 2017, 2:19 PM |
![]() |
Posted
Si1064_PCA0_Capture_Input on
Forum
I used the WDS gennerated the CW project on the Si1064-915-DK board,And I add the PCA0_Capture_Input codes part into the project.It compiled succeed.But there are few questions about this, |
Oct 28 2017, 2:19 PM |