2024-05-23 08:55 PM
I am currently working on a project using the BL4S5IIOT01A board, where I need to send data, which is being printed on the console, to AWS IoT Core. For this purpose, I intend to utilize the X-CUBE-AWS package.
However, I am unable to find the X-CUBE-AWS package within STM32CubeIDE. Could you please guide me on how to integrate or access the X-CUBE-AWS package in STM32CubeIDE for the BL4S5IIOT01A board? Any detailed instructions or steps to resolve this issue would be highly appreciated.
i have a normal embedded led blinking code i have attached the document for your reference, please provide a guide how to link this project with aws. i refered https://catalog.us-east-1.prod.workshops.aws/workshops/b5857416-f2f6-4188-8562-053ec5f983ef/en-US workshop but they did not show the clear step like how to link data logger code with x cube aws package.
it would be great if you provide assistance on this query
2024-05-24 05:20 AM
https://www.st.com/en/embedded-software/x-cube-aws.html
Get version 2.0.0
This works under STM32CubeIDE 1.7.0 version at the maximum.
2024-05-24 05:27 AM
I NEED STEPS HOW TO INTEGRATE THIS PACKAGE WITH MY NORMAL EMBEDDED PROJECT
2024-05-24 05:50 AM
It's a standalone project in STM32CubeIDE environment
Launch IDE1.7.0 and import project.
Path:
C:\abx\STM32CubeExpansion_Cloud_AWS_V2.0.0\Projects\B-L4S5I-IOT01A\Applications\Cloud\aws_demos\STM32CubeIDE
2024-05-24 07:55 AM
The current project path you gave involves inbuilt sensor data collection, which is already included in the X-CUBE-AWS package. I want to integrate my custom embedded project, which uses external sensors, with this package.
2024-06-06 11:18 PM - edited 2024-06-07 01:26 AM
hi @hayat I need assistance in initializing an MQTT connection from STM32CubeIDE to connect with a cloud platform for the BL4S5IIOT01A board. I am facing difficulties in connecting the client with the broker.
this is the output i am getting i have attached the main.c file and for this project i have used paho mqtt package(https://github.com/Doawen/paho.mqtt.embedded-c.git).
2024-06-17 12:28 PM
Try,
function pack
FP-CLD-AWS1
For the ADC, you can adopt the listed code below.
The working steps are shown in the attached file.
// --------------------------------------------------------------------
// Configure ADC1
RCC->AHB2ENR |= 1; /* enable GPIOA clock */
// MODE: 00: Input mode, 01: General purpose output mode
// 10: Alternate function mode, 11: Analog mode (reset state)
GPIOA->MODER &= (unsigned int)~(0x3 << 1*2); // Clear bit PA1
GPIOA->MODER |= (0x3 << 1*2); // Set bit PA1 Analog
/* setup ADC1 */
RCC->AHB2ENR |= 1 << 13; /* enable ADC1 clock */
ADC1->CR = 0x10000000; /* SW trigger, regulator enabled */
ADC1->SQR1 &= ~0xFFFFFFFF; /* clear channel selects first */
ADC1->SQR1 |= 0x00000180; /* set channel 6, and conversion sequence length 1 */
ADC1->CFGR = 0x3000; /* continuous mode, Overrun = ignored */
ADC1->SMPR1 = 0x00140000; // Sampling time, 92.5 cycles
ADC1_COMMON->CCR = 0x002c0000; // pre-scalar by 256
RCC->CFGR |= 1 << 4; // AHB clock pre-scalar
ADC1_COMMON->CCR |= 1 << 16; // *** HCLK/1,2,3 (Synchronous clock mode)
ADC1->CR |= 1; // enable ADC1
while(!(ADC1->ISR & 1)) { } // Wait until ADC1 is ready
// --------------------------------------------------------------------
// Connect PA5 to PA1 for demonstration
while(1) {
// DAC->CR |= 0x18000; // Enable DAC CH2, at 80MHz
// Data to send
DAC->DHR12R2 = valueDAC++ & 0xfff; // 12-bit, right aligned, CH 2
ADC1->CR |= 0x00000004; // SW - Start a conversion
while(!(ADC1->ISR & 4)) {} /* Wait for conversion complete */
valueADC = ADC1->DR; /* read conversion result, 12-bit, Right aligned */
// A read clears the conversion completion flag
if (valueADC >= 0x100)
GPIOB->BSRR |= (0x1 << 14); // Bit Set (PB14 ON)
else
GPIOB->BSRR |= (0x1 << (14+16)); // Bit Reset (PB14 OFF)
double temp = (double)valueADC / 4095 * 330; // In degree FO
delayUs(100);
}
} // program ends