Quantcast
Channel: Forums - Recent Threads
Viewing all 262198 articles
Browse latest View live

MSP430G2553: PWM MSP430G2553

$
0
0

Part Number:MSP430G2553

Hello!
I have this firmware simulating in the Proteus 8.6 software with the MSP430F2132 card, it is working perfectly the PWM and ADC, however I need to use the MSP430G2553 card and I am not getting pwm signal output results. Could someone guide me on what to do to get the same firmware for the MSP430G2553?

Thank you!

/*******************************************************************************
*                                 FACIT                                        *
*                          Sistemas Embarcados                                 *
********************************************************************************
* VERSÃO:1.0                                                                   *
* DATA:06/06/2018                                                              *
*******************************************************************************/

/*******************************************************************************
*                       DESCRIÇÃO GERAL DO FIRMWARE                            *
*******************************************************************************/
/*


*/

/*==============================================================================
1. ARQUIVOS DE DEFINIÇÕES (INCLUDES)
==============================================================================*/
//#include "msp430F2132.h" // Biblicota domicrocontrolador MSP430F2132
#include "msp430g2553.h" 
#include <intrinsics.h>
int valor=80;

/*==============================================================================
2. DECLARAÇÕES
==============================================================================*/
void configura_pwm(void);

void configura_DCO(void);


/*==============================================================================
3. PROTOTIPAGEM DE FUNÇÕES
==============================================================================*/

void configura_adc(void);

void configura_DCO(void);


/*==============================================================================
5. FUNÇÃO PRINCIPAL
==============================================================================*/

int main( void )
{
    WDTCTL = WDTPW + WDTHOLD; // Desativa o watchdog timer 
  P1DIR |= 0xFF;            // Configura P1 como Saída 
  P1SEL |= BIT3;	           // Função alternativa para P1.2(TA1) e P1.3(TA2)
  
  configura_pwm();
  // Configurações
  WDTCTL = WDTPW + WDTHOLD;     // Desativa o watchdog timer
  
  configura_DCO();

  // Configuração das portas
  P1DIR = 0xFF;                     // Configura todos os bits como saída 
  P1OUT = 0x00;                     // Limpa a saída
  valor=ADC10MEM;
  configura_adc();
  valor=ADC10MEM;
  for (;;)
  {
   valor=ADC10MEM;
   ADC10CTL0 |= ENC + ADC10SC;        // Inicia amostragem e conversão
 
    __bis_SR_register(CPUOFF + GIE);   // Coloca no modo LPM0 e habilita
                                    // interrupção geral
    CCR1 = (512-valor);
    }}
    
   /*==============================================================================
6. FUNÇÃO DO USUÁRIO
==============================================================================*/

void configura_adc()
{
      ADC10CTL1 = INCH_1 + ADC10DIV_3 ;         // Channel 3, ADC10CLK/3
      ADC10CTL0 = SREF_0 + ADC10SHT_3 + ADC10ON + ADC10IE;  // Vcc & Vss as reference, Sample and hold for 64 Clock cycles, ADC on, ADC interrupt enable
      ADC10AE0 |= BIT3;  
}

void configura_pwm()
{
    CCR0 = 512;               // Período do PWM (contagem do TAR)512
    CCTL1 = OUTMOD_7;         // Modo de operação 7 Reset/set
    CCR1 = valor;               // Duty cycle (ciclo ativo = 75%)384
    CCTL2 = OUTMOD_7;         // Modo de operação 7 Reset/set
    CCR2 = 50;               // Duty cycle (ciclo ativo = 25%)128
    TACTL = TASSEL_2 + MC_1 + ID_2 ;  // Fonte de clock SMCLK, Modo de contagem crescente 
}

// Rotina de Tratamento de interrupção ISR do ADC10
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR(void)
{
  __bic_SR_register_on_exit(CPUOFF);        // Retira a CPU do modo LPM0
}

// Calibrando a frequência do DCO
void configura_DCO(void)
{
  if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF)                                     
  {  
    while(1);                        // Se constantes de calibração apagadas
                                     // aguardar CPU!!
  } 
  // 1Mhz
  BCSCTL1 = CALBC1_1MHZ;             // Configura intervalo
  DCOCTL = CALDCO_1MHZ;              // Configura DCO + modulação  */

}


/*==============================================================================
                               FIM DO ARQUIVO
==============================================================================*/

Result with MSP430F2132

Result with MSP430g2553


BQ40Z60: System Present High and Low Voltage Ranges

$
0
0

Part Number:BQ40Z60

Hello,

I am using a BQ40z60 in a custom-designed circuit.

System Present functionality is enabled on Pin 14 of the chip, and is used to enable charging and discharging of a LiPo battery.

Is there any recommendation for the voltage range of the high, inactive state of system present? For example, should the voltage on this pin not go above 1V or below 0.1V in order to remain inactive?

How about the voltage range for low, active state?

At what voltage does the chip transition from high to low? It seems to be between 0.2V and 0.05V, but I am looking to find the exact voltage.

IWR1443BOOST: mmwave Demo Visualizer error

$
0
0

Part Number:IWR1443BOOST

I have exactly the same issue where mmwave Demo Visualizer does not appear to be working at all. The followings are the steps I took

1. set SOP jumpers to 101

2. re-flashed the DUT with xwr14xx_mmw_demo_mss.bin using uniflash

3. remove SOP2 jumper

4. power cycle DUT

5. start mmwave Visualizer, set comPort accordingly and plaform= xWR14xx; SDK version=1.2; Antenna Config=4Rx,2Tx

6. "COM3:115200, COM4:921600 waiting for data ." message shown at the bottom of the screen; so I pressed NRST button on the DUT.  message changed to "COM3:115200, COM4:921600 Hardware Connected."

7. pressed "send config to mmwave"; nothing shown on the console box

6. went to plots, select load config from pc and send; still nothing happended

The IWR1443 LED DS3 remainedoff all the time.

TMS320LF2406A: TMS320LF2406APZA BSDL file

AWR1642BOOST: Start the radar sensor upon boot

$
0
0

Part Number:AWR1642BOOST

Hi! I am using the AWR1642 BOOST to perform point cloud scanning for a drone through ROS.

I am just wondering if there is a way for me to start the radar scanning upon powering on? I am thinking of having a preset configuration file and then just launch it in the device upon boot? So the moment I switch it on, it should already begin scanning. Right now, everytime I switch it on, there are 2 LEDs (one orange, one red), and I have to hook up my microcomputer (I am using ODROID on Ubuntu Linux, 16.04) to a screen and key in the ROS commands to launch the radar sensor, then I would see the 3 LEDs switch on. Ideally, I would like to just have it all start up automatically the moment I power it on, is there a way to do this?

Thank you!

Cheers

Sam

LMK61E2EVM: How to reset LMK61E2EVM?

$
0
0

Part Number:LMK61E2EVM

Last night, after choosing some parameters in the Code Loader 4 and clicking Program EEPROM, the corresponding signals showed up on my oscilloscope,

which means the LMK61E2EVM works fine, I think.

But this morning, no signal showed up on the oscilloscope after clicking Program EEPROM.

And, when I clicked the Find I2C Address and Generate Configuration, the orange LED blinked as usual. And I2C address can be scanned successfully.

Emmm, I believe some misoperation of mine causes this.

So my questions are:

How to judge whether my LMK61E2EVM is broken down?

And is there any way to RESET it?

CC2630: When Vin 3.3V, No RF signal and Vin 3V is OK

$
0
0

Part Number:CC2630

Hi,

We used CC2630F128RGZR(7X7) for Zigbee node. We met a issue when debug.

When Vin=3.3V, there is no RF singal and can't networking. But when hand touch the PCB trace antenna, The RF is OK.

When Vin=3V, The RF is OK.

We tested CC2630EVM and it is OK.

PS: The PCB is smaller than CC2630EVM and two layers.

Could you kindly help to check the issue and give some suggestions. Thanks.

Schematic

Thanks

Walsh

TINA/Spice/SN74ALVCH16825: SN74ALVCH16825 IBIS model


Linux/DRA745: how to understand filevpedisplay

$
0
0

Part Number:DRA745

Tool/software: Linux

Hi,

I am not sure if filevpedisplay run like this:

srcBuffers and dstBuffers are both allocdated by kernel, and DMA ZONE is first priority buffer allocate from maybe.

video data will be read into srcBuffer, DMA Engine(hardware) will copy srcBuffer data to dstBuffer. and then dstBuffer will display on screen. is this right?

please let me confirm some questions with you.

Q:

1. if srcbuffer and dstbuffer are two different buffers(both on virtual and physical)? where srcBuffer and dstBuffer alloc from, and when(triggered by ioctl VIDIOC_REQBUFS)?

2. how srcbuffer data move to dstbuffer, using DMA?

Thank you,

sinkeu

TMS320C6670: PCIe VendorID/DeviceID swapped in PCIE LLD

$
0
0

Part Number:TMS320C6670

Hello!

Yet another user confirmed PCIe VID and PID get swapped when obtained with LLD, while raw value is correct.

Please comment.

CCS/TM4C123GH6PM: based on external analog input trigger email using tm4c123gxl launchpad

$
0
0

Part Number:TM4C123GH6PM

Tool/software: Code Composer Studio

for the below code i have to

1.find  Identify the code that helps in establishing connection over SMTP.

2.Modify the code to trigger E-mail application based upon external analog input. 

so please help me to find out this two question's answer.

/*
* main.c - sample application to send email
*

*
*/

/*
* Application Name - Email
* Application Overview - This sample application demonstrates how CC3100
* can be used to send an email over SMTP. The application
* configures CC3100 to connect w/ an SMTP server and sends
* email to it. SMTP server forwards it to the recipient's
* email-server and the recipient receives the email from
* his email-server using IMAP/POP3 and/or other proprietary
* protocol.
* Application Details - processors.wiki.ti.com/.../CC31xx_Email_Demo_Application
* doc\examples\email.pdf
*/

#include "email.h"
#include "config.h"
#include "sl_common.h"

#define APPLICATION_VERSION "1.2.0"

#define SL_STOP_TIMEOUT 0xFF

/*
* GLOBAL VARIABLES -- Start
*/
_u32 g_Status = 0;
/*
* GLOBAL VARIABLES -- End
*/


/*
* STATIC FUNCTION DEFINITIONS -- Start
*/
static _i32 establishConnectionWithAP();
static _i32 disconnectFromAP();
static _i32 configureSimpleLinkToDefaultState();

static _i32 initializeAppVariables();
static void displayBanner();

static _i32 setEmail();
static _i32 sendEmail();
/*
* STATIC FUNCTION DEFINITIONS -- End
*/


/*
* ASYNCHRONOUS EVENT HANDLERS -- Start
*/

/*!
\brief This function handles WLAN events

\param[in] pWlanEvent is the event passed to the handler

\return None

\note

\warning
*/
void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent)
{
if(pWlanEvent == NULL)
{
CLI_Write(" [WLAN EVENT] NULL Pointer Error \n\r");
return;
}

switch(pWlanEvent->Event)
{
case SL_WLAN_CONNECT_EVENT:
{
SET_STATUS_BIT(g_Status, STATUS_BIT_CONNECTION);

/*
* Information about the connected AP (like name, MAC etc.) will be
* available in 'slWlanConnectAsyncResponse_t' - Applications
* can use it if required
*
* slWlanConnectAsyncResponse_t *pEventData = NULL;
* pEventData = &pWlanEvent->EventData.STAandP2PModeWlanConnected;
*
*/
}
break;

case SL_WLAN_DISCONNECT_EVENT:
{
slWlanConnectAsyncResponse_t* pEventData = NULL;

CLR_STATUS_BIT(g_Status, STATUS_BIT_CONNECTION);
CLR_STATUS_BIT(g_Status, STATUS_BIT_IP_ACQUIRED);

pEventData = &pWlanEvent->EventData.STAandP2PModeDisconnected;

/* If the user has initiated 'Disconnect' request, 'reason_code' is SL_USER_INITIATED_DISCONNECTION */
if(SL_WLAN_DISCONNECT_USER_INITIATED_DISCONNECTION == pEventData->reason_code)
{
CLI_Write(" Device disconnected from the AP on application's request \n\r");
}
else
{
CLI_Write(" Device disconnected from the AP on an ERROR..!! \n\r");
}
}
break;

default:
{
CLI_Write(" [WLAN EVENT] Unexpected event \n\r");
}
break;
}
}

/*!
\brief This function handles events for IP address acquisition via DHCP
indication

\param[in] pNetAppEvent is the event passed to the handler

\return None

\note

\warning
*/
void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *pNetAppEvent)
{
if(pNetAppEvent == NULL)
{
CLI_Write(" [NETAPP EVENT] NULL Pointer Error \n\r");
return;
}

switch(pNetAppEvent->Event)
{
case SL_NETAPP_IPV4_IPACQUIRED_EVENT:
{
SET_STATUS_BIT(g_Status, STATUS_BIT_IP_ACQUIRED);

/*
* Information about the connected AP's IP, gateway, DNS etc.
* will be available in 'SlIpV4AcquiredAsync_t' - Applications
* can use it if required
*
* SlIpV4AcquiredAsync_t *pEventData = NULL;
* pEventData = &pNetAppEvent->EventData.ipAcquiredV4;
* <gateway_ip> = pEventData->gateway;
*
*/
}
break;

default:
{
CLI_Write(" [NETAPP EVENT] Unexpected event \n\r");
}
break;
}
}

/*!
\brief This function handles callback for the HTTP server events

\param[in] pHttpEvent - Contains the relevant event information
\param[in] pHttpResponse - Should be filled by the user with the
relevant response information

\return None

\note

\warning
*/
void SimpleLinkHttpServerCallback(SlHttpServerEvent_t *pHttpEvent,
SlHttpServerResponse_t *pHttpResponse)
{
/*
* This application doesn't work with HTTP server - Hence these
* events are not handled/expected here
*/
CLI_Write(" [HTTP EVENT] Unexpected event \n\r");
}

/*!
\brief This function handles general error events indication

\param[in] pDevEvent is the event passed to the handler

\return None
*/
void SimpleLinkGeneralEventHandler(SlDeviceEvent_t *pDevEvent)
{
/*
* Most of the general errors are not FATAL are are to be handled
* appropriately by the application
*/
CLI_Write(" [GENERAL EVENT] \n\r");
}

/*!
\brief This function handles socket events indication

\param[in] pSock is the event passed to the handler

\return None
*/
void SimpleLinkSockEventHandler(SlSockEvent_t *pSock)
{
if(pSock == NULL)
{
CLI_Write(" [SOCK EVENT] NULL Pointer Error \n\r");
return;
}

switch( pSock->Event )
{
case SL_SOCKET_TX_FAILED_EVENT:
{
/*
* TX Failed
*
* Information about the socket descriptor and status will be
* available in 'SlSockEventData_t' - Applications can use it if
* required
*
* SlSockEventData_u *pEventData = NULL;
* pEventData = & pSock->socketAsyncEvent;
*/
switch( pSock->socketAsyncEvent.SockTxFailData.status )
{
case SL_ECLOSE:
CLI_Write(" [SOCK EVENT] Close socket operation failed to transmit all queued packets\n\r");
break;


default:
CLI_Write(" [SOCK EVENT] Unexpected event \n\r");
break;
}
}
break;

default:
CLI_Write(" [SOCK EVENT] Unexpected event \n\r");
break;
}
}
/*
* ASYNCHRONOUS EVENT HANDLERS -- End
*/


/*
* Application's entry point
*/
int main(int argc, char** argv)
{
_i32 retVal = -1;

retVal = initializeAppVariables();
ASSERT_ON_ERROR(retVal);

/* Stop WDT and initialize the system-clock of the MCU */
stopWDT();
initClk();

/* Configure command line interface */
CLI_Configure();

displayBanner();

/*
* Following function configures the device to default state by cleaning
* the persistent settings stored in NVMEM (viz. connection profiles &
* policies, power policy etc)
*
* Applications may choose to skip this step if the developer is sure
* that the device is in its default state at start of application
*
* Note that all profiles and persistent settings that were done on the
* device will be lost
*/
retVal = configureSimpleLinkToDefaultState();
if(retVal < 0)
{
if (DEVICE_NOT_IN_STATION_MODE == retVal)
CLI_Write(" Failed to configure the device in its default state \n\r");

LOOP_FOREVER();
}

CLI_Write(" Device is configured in default state \n\r");

/*
* Initializing the CC3100 device
* Assumption is that the device is configured in station mode already
* and it is in its default state
*/
retVal = sl_Start(0, 0, 0);
if ((retVal < 0) ||
(ROLE_STA != retVal) )
{
CLI_Write(" Failed to start the device \n\r");
LOOP_FOREVER();
}

CLI_Write(" Device started as STATION \n\r");

/* Configure the source email */
retVal = setEmail();
if(retVal < 0)
LOOP_FOREVER();

/* Connecting to WLAN AP */
retVal = establishConnectionWithAP();
if(retVal < 0)
{
CLI_Write(" Failed to establish connection w/ an AP \n\r");
LOOP_FOREVER();
}

CLI_Write(" Connection established w/ AP and IP is acquired \n\r");

/* Configure and send the email */
CLI_Write(" Sending email... \n\r");
retVal = sendEmail();
if (retVal < 0)
{
CLI_Write(" Device couldn't send the email \n\r");
LOOP_FOREVER();
}
else
{
CLI_Write(" Email Sent successfully \n\r");
}

/* Disconnect from AP */
retVal = disconnectFromAP();
if(retVal < 0)
{
CLI_Write(" Failed to disconnect from the AP \n\r");
LOOP_FOREVER();
}

retVal = sl_Stop(SL_STOP_TIMEOUT);
if(retVal < 0)
LOOP_FOREVER();

return 0;
}

/*!
\brief This function configures the source email using parameters defined
in "config.h" file

\param[in] none

\return none

\note

\warning
*/
static _i32 setEmail()
{
_i32 retVal = -1;
SlNetAppSourceEmail_t sourceEmailId = {0};
SlNetAppSourcePassword_t sourceEmailPwd = {0};
SlNetAppEmailOpt_t eMailServerSetting = {0};

pal_Memcpy(sourceEmailId.Username,USER,pal_Strlen(USER)+1);
retVal = sl_NetAppEmailSet(NETAPP_SOURCE_EMAIL,pal_Strlen(USER)+1,
(_u8*)&sourceEmailId);
ASSERT_ON_ERROR(retVal);

pal_Memcpy(sourceEmailPwd.Password,PASS,pal_Strlen(PASS)+1);
retVal = sl_NetAppEmailSet(NETAPP_PASSWORD,pal_Strlen(PASS)+1,
(_u8*)&sourceEmailPwd);
ASSERT_ON_ERROR(retVal);

eMailServerSetting.Family = AF_INET;
eMailServerSetting.Port = GMAIL_HOST_PORT;
eMailServerSetting.Ip = SL_IPV4_VAL(74,125,129,108);
eMailServerSetting.SecurityMethod = SL_SO_SEC_METHOD_SSLv3_TLSV1_2;
//we changed SL_SO_SEC_METHOD_ SSLV3 with SL_SO_SEC_METHOD_SSLv3_TLSV1_2
eMailServerSetting.SecurityCypher = SL_SEC_MASK_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256;
//we changed SL_SEC_MASK_SSL_RSA_WITH_RC4_128_MD5 with SL_SEC_MASK_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
// eMailServerSetting.SecurityMethod = SL_SO_SEC_METHOD_SSLV3;
// eMailServerSetting.SecurityCypher = SL_SEC_MASK_SSL_RSA_WITH_RC4_128_MD5;

retVal = sl_NetAppEmailSet(NETAPP_ADVANCED_OPT,sizeof(SlNetAppEmailOpt_t),
(_u8*)&eMailServerSetting);
ASSERT_ON_ERROR(retVal);

return SUCCESS;
}

/*!
\brief Send the email to the preconfigured email ID

\param[in] none

\return 0 for success , -1 otherwise

\note

\warning
*/
static _i32 sendEmail()
{
_i32 Status = -1;

Status = sl_NetAppEmailSet(NETAPP_DEST_EMAIL,
pal_Strlen(DESTINATION_EMAIL),
(_u8 *)DESTINATION_EMAIL);
ASSERT_ON_ERROR(Status);

Status = sl_NetAppEmailSet(NETAPP_SUBJECT,
pal_Strlen(EMAIL_SUBJECT),
(_u8 *)EMAIL_SUBJECT);
ASSERT_ON_ERROR(Status);

Status = sl_NetAppEmailSet(NETAPP_MESSAGE,
pal_Strlen(EMAIL_MESSAGE),
(_u8 *)EMAIL_MESSAGE);
ASSERT_ON_ERROR(Status);

Status = sl_NetAppEmailConnect();
ASSERT_ON_ERROR(Status);

Status = sl_NetAppEmailSend();
ASSERT_ON_ERROR(Status);

return SUCCESS;
}

/*!
\brief This function configure the SimpleLink device in its default state. It:
- Sets the mode to STATION
- Configures connection policy to Auto and AutoSmartConfig
- Deletes all the stored profiles
- Enables DHCP
- Disables Scan policy
- Sets Tx power to maximum
- Sets power policy to normal
- Unregisters mDNS services
- Remove all filters

\param[in] none

\return On success, zero is returned. On error, negative is returned
*/
static _i32 configureSimpleLinkToDefaultState()
{
SlVersionFull ver = {0};
_WlanRxFilterOperationCommandBuff_t RxFilterIdMask = {0};

_u8 val = 1;
_u8 configOpt = 0;
_u8 configLen = 0;
_u8 power = 0;

_i32 retVal = -1;
_i32 mode = -1;

mode = sl_Start(0, 0, 0);
ASSERT_ON_ERROR(mode);

/* If the device is not in station-mode, try configuring it in station-mode */
if (ROLE_STA != mode)
{
if (ROLE_AP == mode)
{
/* If the device is in AP mode, we need to wait for this event before doing anything */
while(!IS_IP_ACQUIRED(g_Status)) { _SlNonOsMainLoopTask(); }
}

/* Switch to STA role and restart */
retVal = sl_WlanSetMode(ROLE_STA);
ASSERT_ON_ERROR(retVal);

retVal = sl_Stop(SL_STOP_TIMEOUT);
ASSERT_ON_ERROR(retVal);

retVal = sl_Start(0, 0, 0);
ASSERT_ON_ERROR(retVal);

/* Check if the device is in station again */
if (ROLE_STA != retVal)
{
/* We don't want to proceed if the device is not coming up in station-mode */
ASSERT_ON_ERROR(DEVICE_NOT_IN_STATION_MODE);
}
}

/* Get the device's version-information */
configOpt = SL_DEVICE_GENERAL_VERSION;
configLen = sizeof(ver);
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (_u8 *)(&ver));
ASSERT_ON_ERROR(retVal);

/* Set connection policy to Auto + SmartConfig (Device's default connection policy) */
retVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 0, 0, 0, 1), NULL, 0);
ASSERT_ON_ERROR(retVal);

/* Remove all profiles */
retVal = sl_WlanProfileDel(0xFF);
ASSERT_ON_ERROR(retVal);

/*
* Device in station-mode. Disconnect previous connection if any
* The function returns 0 if 'Disconnected done', negative number if already disconnected
* Wait for 'disconnection' event if 0 is returned, Ignore other return-codes
*/
retVal = sl_WlanDisconnect();
if(0 == retVal)
{
/* Wait */
while(IS_CONNECTED(g_Status)) { _SlNonOsMainLoopTask(); }
}

/* Enable DHCP client*/
retVal = sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,1,1,&val);
ASSERT_ON_ERROR(retVal);

/* Disable scan */
configOpt = SL_SCAN_POLICY(0);
retVal = sl_WlanPolicySet(SL_POLICY_SCAN , configOpt, NULL, 0);
ASSERT_ON_ERROR(retVal);

/* Set Tx power level for station mode
Number between 0-15, as dB offset from max power - 0 will set maximum power */
power = 0;
retVal = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, WLAN_GENERAL_PARAM_OPT_STA_TX_POWER, 1, (_u8 *)&power);
ASSERT_ON_ERROR(retVal);

/* Set PM policy to normal */
retVal = sl_WlanPolicySet(SL_POLICY_PM , SL_NORMAL_POLICY, NULL, 0);
ASSERT_ON_ERROR(retVal);

/* Unregister mDNS services */
retVal = sl_NetAppMDNSUnRegisterService(0, 0);
ASSERT_ON_ERROR(retVal);

/* Remove all 64 filters (8*8) */
pal_Memset(RxFilterIdMask.FilterIdMask, 0xFF, 8);
retVal = sl_WlanRxFilterSet(SL_REMOVE_RX_FILTER, (_u8 *)&RxFilterIdMask,
sizeof(_WlanRxFilterOperationCommandBuff_t));
ASSERT_ON_ERROR(retVal);

retVal = sl_Stop(SL_STOP_TIMEOUT);
ASSERT_ON_ERROR(retVal);

retVal = initializeAppVariables();
ASSERT_ON_ERROR(retVal);

return retVal; /* Success */
}

/*!
\brief Connecting to a WLAN Access point

This function connects to the required AP (SSID_NAME).
The function will return once we are connected and have acquired IP address

\param[in] None

\return 0 on success, negative error-code on error

\note

\warning If the WLAN connection fails or we don't acquire an IP address,
We will be stuck in this function forever.
*/
static _i32 establishConnectionWithAP()
{
SlSecParams_t secParams = {0};
_i32 retVal = 0;

secParams.Key = PASSKEY;
secParams.KeyLen = PASSKEY_LEN;
secParams.Type = SEC_TYPE;

retVal = sl_WlanConnect(SSID_NAME, pal_Strlen(SSID_NAME), 0, &secParams, 0);
ASSERT_ON_ERROR(retVal);

/* Wait */
while((!IS_CONNECTED(g_Status)) || (!IS_IP_ACQUIRED(g_Status))) { _SlNonOsMainLoopTask(); }

return SUCCESS;
}

/*!
\brief Disconnecting from a WLAN Access point

This function disconnects from the connected AP

\param[in] None

\return none

\note

\warning If the WLAN disconnection fails, we will be stuck in this function forever.
*/
static _i32 disconnectFromAP()
{
_i32 retVal = -1;

/*
* The function returns 0 if 'Disconnected done', negative number if already disconnected
* Wait for 'disconnection' event if 0 is returned, Ignore other return-codes
*/
retVal = sl_WlanDisconnect();
if(0 == retVal)
{
/* Wait */
while(IS_CONNECTED(g_Status)) { _SlNonOsMainLoopTask(); }
}

return SUCCESS;
}

/*!
\brief This function initializes the application variables

\param[in] None

\return 0 on success, negative error-code on error
*/
static _i32 initializeAppVariables()
{
g_Status = 0;

return SUCCESS;
}

/*!
\brief This function displays the application's banner

\param None

\return None
*/
static void displayBanner()
{
CLI_Write("\n\r\n\r");
CLI_Write(" Email application - Version ");
CLI_Write(APPLICATION_VERSION);
CLI_Write("\n\r*******************************************************************************\n\r");
}

CCS/TM4C123GH6PM: i want to write code for interface two potentiometer with tm4c123gxl according that i need to control speed of motor.

$
0
0

Part Number:TM4C123GH6PM

Tool/software: Code Composer Studio

for below code what i need to change so i can interface two potentiometer.

when i try this simultenously it not control  the motor speed.

in my this program i have to control speed of motor using two potentiometer.

#include<stdint.h>
#include<stdbool.h>
#include"inc/hw_memmap.h"
#include"driverlib/gpio.h"
#include"inc/hw_types.h"
#include"driverlib/debug.h"
#include"driverlib/sysctl.h"
#include"driverlib/adc.h"
// TO STORE THE VALUE IN VARIABLE ui32ADC0Value FOR EVERY SAMPLING//

uint32_t ui32ADC0Value[1],ui32ADC0Value1[1];
int main(void)
{
// SYSTEM CLOCK AT 40MHZ
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); // ENABLE ADC0 MODULE
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC1); // ENABLE ADC0 MODULE

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); // ENABLE GPIO for ADC0
//MODULE
GPIOPinTypeADC(GPIO_PORTE_BASE,GPIO_PIN_3);// ENABLE AN0 OF ADC0 MODULE
GPIOPinTypeADC(GPIO_PORTE_BASE,GPIO_PIN_2);// ENABLE AN0 OF ADC0 MODULE

// ADC0 MODULE, TRIGGER IS PROCESSOR EVENT, SEQUENCER 0 IS CONFIGURED
ADCSequenceConfigure(ADC0_BASE, 1, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceConfigure(ADC1_BASE, 1, ADC_TRIGGER_PROCESSOR, 1);
// ADC0 MODULE, SEQUENCER 0 , FOR 1 SAMPLING, INPUT IS FROM CHANNEL 0 PE3
ADCSequenceStepConfigure(ADC0_BASE, 1, 0, ADC_CTL_CH0);
ADCSequenceStepConfigure(ADC1_BASE, 1, 1, ADC_CTL_CH1);
// ENABLE THE SEQUENCE 1 FOR ADC0
ADCSequenceEnable(ADC0_BASE, 1);
ADCSequenceEnable(ADC1_BASE, 1);
while(1)
{
// CLEAR INTERRUPT FLAG FOR ADC0, SEQUENCER 1
ADCIntClear(ADC0_BASE, 1);
ADCIntClear(ADC1_BASE, 1);
// TRIGGER IS GIVEN FOR ADC 0 MODULE, SEQUENCER 1
ADCProcessorTrigger(ADC0_BASE, 1);
ADCProcessorTrigger(ADC1_BASE, 1);
while(!ADCIntStatus(ADC0_BASE, 1, false))
{
}

//
// Clear the ADC interrupt flag.
//
ADCIntClear(ADC0_BASE, 3);

// STORE THE CONVERTED VALUE FOR ALL DIFFERENT SAMPLING IN ARRAY
//ui32ADC0Value
ADCSequenceDataGet(ADC0_BASE, 1, ui32ADC0Value);
ADCSequenceDataGet(ADC1_BASE, 1, ui32ADC0Value1);
}
}

CC2540: how decrypt the data packet in ti sniffer

$
0
0

Part Number:CC2540

hi to all,

i am new in ble and i want use ti sniffer based on cc2540 to learn more about ble, i want sniff an encrypted connection but when i want sniff this connection sniffer show only the encrypted packets, in below pic you can see the result:

as you can see i entered the passkey and also sniffer detected the LTK, but it still show the encrypted packet. and also main data between central and peripheral tranfered through notify charactristic, i also attached dump of connection.

now can any one give me a advice to see decrypted data packets??

(Please visit the site to view this file)

CC2540: how disable encryption in ble connetction

$
0
0

Part Number:CC2540

hi to all,

i am new in ble, i have an example that in it cc2540 play central role in ble connection, i want use sniffer to see ble packets but the connection is encrypted. i want know that how can i disable encryption in CC2540 side. in below pic you can see that LL_ENCRYPTION_SEQ sent by the master that in my case is CC2540.

thanks.

RTOS/TM4C1294NCPDT: USB connection issue on custom board, working fine on EVAL board.

$
0
0

Part Number:TM4C1294NCPDT

Tool/software: TI-RTOS

Ref:

I have working USB CDC driver on TI EVAL board but did not work on custom board.

From what I read in USBAnalyser, it seems to be connected but unable to respond to VID/PID number and thus highlight USB nodevice error (or similar). The custom board has isolation device of same design I used on LPC154x device which was working good. I'm unsure if USB-ID would have impacts. I have not installed any TI driver. I have latest version CCS 8.0 with RTOS and TIVA library as of today. My PC is window 10. The custom board has the same TM4C1294 device as in EVAL board. 

The firmware was based on RTOS, TI example USB CDC driver that found in TI library, I copied over to custom workspace and added several codes (GPIO, Timer, SPI, etc) to achieve custom operation. Even with modified firmware, the USB worked fine on EVAL board (TM4C1294 boosterpack) but it did not work on custom board (see schematic). 

In the custom board, I have 16MHz XTAL instead of 25MHz XTAL but I included the code to boost 16Mhz to 120MHz to match system clock (see code below). Later on I going to change 16MHz to 25MHz (on order) if this solves USB clock issue.

(1) Is there code to correct USB clock from 16Mhz, can u provide which one.

(2) Does USB operation has impacts because of different XTAL 16MHz and 25MHz, even the system clock is 120MHz. 

(3) I'm open for idea how to attack the problem and have USB working. I have studied and worked on USB project via LPC1549 many years ago so I'm familiar with them.

#ifndef THISISEVALBOARD
    uINT32 ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
#endif

 

 


BQ34Z100-G1: Using a lower charge termination voltage than specified by the cell manufacturer

$
0
0

Part Number:BQ34Z100-G1

Hello

We have a 6 cell application where we have successfully performed a learning cycle with the parameters specified by the cell manufacturer. Now our customer wants to have the cell charge termination voltage set to 4.05V instead of 4.2V as specified by the cell manufacturer.

The problem is now that the soc reading is not accurate anymore. It jumps while discharging the cells.

How can issue be solved?

Thanks

Fabian

Mr. Jay. Puranik, Nashik, India

$
0
0

Date: 24th June 2018.

 

Dear Technical Support Teams,

 

I need your advice for designing a suitable Battery Charger intended to be used in India for Electric Auto-Rickshaws using BLDC Motor and the Battery Options of:

 

1] Rechargeable Lead-Acid Batteries, and alternatively

 

2] Lithium-Ion Batteries.

 

The User will have a facility for switch selection to select the type of Batteries.

 

The Charger Input Supply is AC, 170 V to 300 V, 50 Hz.

 

The Charger Output DC Supply is: 65 V DC +/- 0.50 V, and DC Output Charging Current at Max. 15.0 Amps +/- 0.3 Amp.

 

The acceptable Ripple on the Output DC Voltage is less than 1 V (Peak-to-Peak), at nominal rated Input of 230 Vac, 50 Hz.

 

The Battery Charging Profile for the Lead-Acid Batteries would be:

 

a] Bulk Charging State: In Normal Mode: At 15 Amps @ 59.2 V +/- 0.5 V. In BOOT Mode: @ 62.0 V +/-0.5 V

 

b] Absorption State: At 10 Amps up to Charging Current decreases below 5.00 Amp +/- 0.5 Amp.

 

c] Equalization State: At 5 Amps at Max. of 65 V +/- 0.5 V up to 2 Hours.

 

I will be using a Micro-Controller for the above so that the CV-CC-CV Modes for this 1000 Watt max. Battery Charger.

 

Protections: Output Over-Load, Output Short-Circuit, Battery Terminals Reversal, Output Over-Voltage, Battery-Charger Circuit Over-Temperature.

 

I will do the necessary Sensing & Measurements for the AC Input Side & the DC Output Side. Necessary Protections would be taken care of by me.

 

Kindly advice your suitable ICs, Preferred Circuit Topology / Topologies and whatever the additional technical support such as App. Notes, Design Notes, Reference Designs, Recommendations etc., whichever you can provide to me.

 

The Annual Quantities are in the range of 15 K to 25 K Units to be manufactured by us.

 

I will take care of various status Indication LEDs in my design of Micro-Controller Circuit.

 

Please do e-mail to me your best possible advice on this subject.

 

Thanks & with best wishes, - Jaykrushna P. Puranik.

Contact: Mr. Jaykrushna P. Puranik, Vice President (Designs), R & D  Dept., TAS PowerTek Ltd.,

W-61, C/o. Pawar Industries, Opp. “Machine House”, Ambad MIDC Industrial Area, Nasik – 422 010, Maharashtra State, India.

E-mail: jay.puranik@taspowertek.com   Web: www.taspowertek.com

Skype ID: jaykrushna.puranik   Cell: +0091-9370318246, Land-Line Phone: +0091-253-6694959 (R & D).  

Fax: +0091-253-6694 955. Working Hours: 9:30 AM to 6:30 PM. Weekly Off: Saturdays.

CD74HC241: CD74HC241 Replacement Part

$
0
0

Part Number:CD74HC241

Hi team,

Do we have some new devices which is pin 2 pin with CD74HC241M?

We may need to choose a newer device.

Thank you.

BR

Jack Chen

DS280BR810: TI 25G retimer/repeater application

$
0
0

Part Number:DS280BR810

Hi Team,

 

1.       Please help to have some clarification concerning to my specific application (attached ). I considering to use Octal Repeater(ds280br820)/Retimer(ds250df810) part as single device for redrawing both CAUI-4 interface streams : on RX direction 4 differential pairs 25Gbi/s  and on RX direction 4 differential pairs 25GB/s. I don’t found in TI Data Sheet information same application for octal parts. All presented and recommended configurations are having dedicated Retimer/Repeater part for each direction Please explain if this limitation actually relevant because of possible inter channel coupling between TX and RX direction signals used in single octal device (I don’t found any information for this feature in Data Sheet).

2.       Please help to clarify if TI has device same to octal retimer ds250df810 but without embedded  decoupling capacitors on TX outputs. 

 

Thanks,

Shlomi

(Please visit the site to view this file)

 

CC1350: Antenna tuning

$
0
0

Part Number:CC1350

I have copied the schematic of the  RF section from the CC1350 Launchpad for my custom board. Because I have a different PCB layout and antennas, I would need to adjust the values of the matching network.

I don't know what the different components represent. It seems to me that there is more than just matching, filtering and a balun going on here.

I've attached the schematic of it here.

Could you show me which components I need to tweak to match the antennas? Especially for Bluetooth, I get a very weak signal.

How do I match it without a VSR or a spectrum analyzer? Can I use a software calculator?

Can I do it experimentally, like trying out different passives? I could use the Launchpad as the Receiver and use the SmartRF Studio software to take the RSSI as an indicator for how well the transmission line is matched.

Viewing all 262198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>