2019-10-07 11:49 AM
2019-10-07 12:18 PM
>>I also need to know how to connect B-L072Z device to LoRa network without a gateway?
So point-to-point LoRa as a radio vs LoRaWAN as a network?
The ping-pong example doesn't use LoRaWAN (or a gateway), devices take turns as being a talker or a listener. Basically you could have multiple listeners as radio is that type of medium.
2019-10-07 12:24 PM
Is there a way to configure the development board and sxs1276 transceiver using bare metal programming
2019-10-07 12:34 PM
Sure, they are stock STM32L072 and SX1276 parts, the Reference Manual / Data Sheet should be adequate to do register level coding, or use semtech libraries, or whatever you choose.
2019-10-07 12:48 PM
Can you suggest any ide for bare metal programming for stm32 devices and one more question is that if I have to connect to lora network I need a gateway right?
Thanks for your support
2019-10-07 01:00 PM
ST has a free Keil license for Cortex-M0(+) devices https://www2.keil.com/stmicroelectronics-stm32/mdk
LoRaWAN would require some kind of gateway device.
2019-10-09 07:46 AM
I have a quick question for you. I could not see the variables not getting incremented. The keyword "Click" remains zero all the time. Please see the code and let me know if I made any mistake
#include <iostm8l.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "defs.h"
static int click = 0;
void delay(unsigned long dd)
{
unsigned long i;
for (i=0;i<dd;i++) nop();
}
void RTC(void)
{
unsigned long j = 0;
PE_ODR |= 0x80; // led indication for reset
if( click == 2) // reset module
{
click = 0;
PC_ODR &= ~(1<<3); //pc3 in place of push button - turn it off here
for(j = 0;j<20;j++)
{
delay(_250ms_); // 4.3 seconds in real
}
}
if(click == 1) // on module
{
click++;
PC_ODR &= ~(1<<3); //turn it off
for(j = 0;j<8;j++)
{
delay(_250ms_); // wait
}
}
if (click == 0) // off module
{
PC_ODR &= ~(1<<3); //turn it off
click++;
for(j = 0;j<8;j++)
{
delay(_250ms_); // wait
}
PC_ODR |= (1<<3); // turn it on
for(j = 0;j<8;j++)
{
delay(_250ms_); // wait
}
PC_ODR &= ~(1<<3); //turn it off
for(j = 0;j<8;j++)
{
delay(_250ms_); // wait
}
}
RTC_ISR2=0x00; // clear interrupt flags
}
void SetupTimers(void)
{
CLK_CRTCR=0x04; // use iternal LSI/1 clock @ ~38KHz
RTC_WPR=0xCA;
RTC_WPR=0x53;
RTC_CR2=0x00; // disable wakeup timer for register update
while(!(RTC_ISR1 & 0x04));
RTC_CR1=0x04; // set 1hz clk
RTC_WUTRH=0x00; // change here for time change
RTC_WUTRL=0x78; //2 min timer
RTC_CR3=0x00;
RTC_CR2=0x44; // turn on timer and interrupt
RTC_WPR=0xFF; // lock the device
}
main()
{
CLK_DIVR = 0x00; // Set the frequency to 16Mhz
CLK_PCKENR2 = 0x07; // clock for timer1
PC_DDR = 0x08; //direction input for push button
PC_CR1 = 0x08; //floating input pc3
PE_DDR = 0x80; // direction output for led
PE_CR1 = 0x80; // fast push pull mode
SetupTimers();
_asm("rim\n"); // enable interrupt
while(1)
{
PC_ODR |= (1<<3); // turn it on
PE_ODR &= ~(0x80);
}
}
2019-10-09 08:05 AM
Not an STM8 guy
2019-10-09 08:12 AM
It is about the programming I believe. And by the way I posted that question too