u/Yousef_Tele

Best practice for show NMEA NEO-6M data with UART printf?

Hello everyone, I tried to implement a CMSIS-based STM32F103C8T6 NMEA receiver from NEO-6M. Still, I enabled receiver mode on USART1, then implemented printf on USART2, an efficient way to implement it, I think. I can implement a method like this:

USART1 RX (receive nmea) --> DMA like ch15 ---> RAM --> DMA like ch14 ----> USART2 TX (printf)

Please help me, and give me some advice on writing better code

UPDATE: Please for better understanding, check last line on main() in this code "https://github.com/yousefsmt/GSM-GPS-Telemetry/tree/feature/add-peripheral"

reddit.com
u/Yousef_Tele — 6 days ago

If everything block, how can I find best VPN protocol?

Hello everyone, in my environment internet blocks just some sites in the white list like Google and github.com are open.

How can I create a vpn setup with use it connect to main internet?

Some partners used by specific setup with combine vless, vmess. But I want to run my own setup

reddit.com
u/Yousef_Tele — 8 days ago
▲ 2 r/VPN

If everything block, how can I find best VPN protocol?

Hello everyone, in my environment internet blocks just some sites in the white list like Google and github.com are open.

How can I create a vpn setup with use it connect to main internet?

Some partners used by specific setup with combine vless, vmess. But I want to run my own setup

reddit.com
u/Yousef_Tele — 8 days ago

Hello everyone, I wrote the code and wrote it with FTDI to the STM32F103C8T6 Blue Pill, but the on-board LED (PC13) turns on, and doesn't blink. I think this happend for didn't set the interrupt. I set it, but it doesn't work anyway. Why? thanks everyone

#include "FreeRTOSTasks.h"


#include "flash.h"
#include "rcc.h"
#include "gpio.h"


#define WAITE_STATE (0x00U) /* True latency for HSI (8MHz) SYSCLK clock */


void StartTask( void *param );
void InterruptPriority_Config( void );


int main( void )
{
    FLASH_ConfigWaitState( WAITE_STATE );


    RCC_Init();


    SystemCoreClockUpdate();


    GPIO_Init();


    InterruptPriority_Config();


    ( void )xTaskCreate(StartTask, "Task1", STARTUP_STACK_SIZE, NULL, STARTUP_STACK_PRIORITY, NULL);


    vTaskStartScheduler();


    while (1)
    {
        /* code */
    }
    
    return 0;
}


void StartTask( void *param )
{
    ( void )param;


    while (1)
    {
        GPIOC->BSRR = GPIO_BSRR_BS13;
        vTaskDelay(1000);


        GPIOC->BRR = GPIO_BRR_BR13;
        vTaskDelay(1000);
    }
}


void InterruptPriority_Config( void )
{
    /* Priority grouping: 4 bits preemption, 0 bits subpriority */
    NVIC_SetPriorityGrouping(0);


    /* FreeRTOS core exceptions */
    NVIC_SetPriority(SVCall_IRQn, 0);
    NVIC_SetPriority(PendSV_IRQn, 15);
    NVIC_SetPriority(SysTick_IRQn, 15);
}#include "FreeRTOSTasks.h"


#include "flash.h"
#include "rcc.h"
#include "gpio.h"


#define WAITE_STATE (0x00U) /* True latency for HSI (8MHz) SYSCLK clock */


void StartTask( void *param );
void InterruptPriority_Config( void );


int main( void )
{
    FLASH_ConfigWaitState( WAITE_STATE );


    RCC_Init();


    SystemCoreClockUpdate();


    GPIO_Init();


    InterruptPriority_Config();


    ( void )xTaskCreate(StartTask, "Task1", STARTUP_STACK_SIZE, NULL, STARTUP_STACK_PRIORITY, NULL);


    vTaskStartScheduler();


    while (1)
    {
        /* code */
    }
    
    return 0;
}


void StartTask( void *param )
{
    ( void )param;


    while (1)
    {
        GPIOC->BSRR = GPIO_BSRR_BS13;
        vTaskDelay(1000);


        GPIOC->BRR = GPIO_BRR_BR13;
        vTaskDelay(1000);
    }
}


void InterruptPriority_Config( void )
{
    /* Priority grouping: 4 bits preemption, 0 bits subpriority */
    NVIC_SetPriorityGrouping(0);


    /* FreeRTOS core exceptions */
    NVIC_SetPriority(SVCall_IRQn, 0);
    NVIC_SetPriority(PendSV_IRQn, 15);
    NVIC_SetPriority(SysTick_IRQn, 15);
}
reddit.com
u/Yousef_Tele — 17 days ago

Hi everyone, I'm working on an idea about creating an RL gateway agent with the LoRaWAN module NS3, and the RL part works on NS3Gym.

I created an environment with 10 end devices and 1 network server. Gateway, like an UAV, then collects data from each end device. In this scenario, I must minimize the time difference between the data generation time on each node and the network server. But now I think, how can I add some constraints for the end device or gateway, or all parts of the environment? Please give me some idea and any advice for me. Thanks to everyone.

Note that all scenarios were simulated with NS3 (C++) and an RL agent with Python.

reddit.com
u/Yousef_Tele — 19 days ago

Hello everyone, I created a simple task with STM32F103C8T6 and FreeRTOS, then I ran it in Proteus simulator, but it doesn't work. I checked everything, maybe bad, but I didn't find my answer.

I uploaded my project to GitHub at the link below:

https://github.com/yousefsmt/RTOS_TempMon/archive/refs/heads/fix/integerate-all-api.zip

https://github.com/yousefsmt/RTOS_TempMon

Anyone can help me, thank you so much.

** Note: Please check "fix/integerate-all-api" branch **

github.com
u/Yousef_Tele — 19 days ago