From 529e6fff56b76add5831f722c0923f4fc95d4d09 Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Sat, 8 May 2021 20:40:01 +0200 Subject: [PATCH 1/4] Update action.yml spell fix --- .github/actions/arduino-cli/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/arduino-cli/action.yml b/.github/actions/arduino-cli/action.yml index a35a2c48..74f3147d 100644 --- a/.github/actions/arduino-cli/action.yml +++ b/.github/actions/arduino-cli/action.yml @@ -2,7 +2,7 @@ name: 'setup arduino-cli and plattform' description: 'install plattform into arduino-cli to be ready to compile' inputs: boardurl: - description: 'URL of arduino compaible package.json' + description: 'URL of arduino compatible package.json' required: false default: '' plattform: From 00089bb67fe52c0af4ef22ec06a9cca9e9a31baf Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Wed, 26 May 2021 22:19:11 +0200 Subject: [PATCH 2/4] Update compile_config.h (#156) * Update signalduino.h Add all pins as input pullup --- src/compile_config.h | 5 +++-- src/signalduino.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compile_config.h b/src/compile_config.h index e45611b0..7cace992 100644 --- a/src/compile_config.h +++ b/src/compile_config.h @@ -44,7 +44,8 @@ * **************************************** */ -#define PROGVERS "3.5.0-dev+20201221" + +#define PROGVERS "3.5.0-dev+20210420" #ifdef OTHER_BOARD_WITH_CC1101 #define CMP_CC1101 @@ -118,4 +119,4 @@ #endif -#endif /* END _COMPILE_CONFIG_h */ \ No newline at end of file +#endif /* END _COMPILE_CONFIG_h */ diff --git a/src/signalduino.h b/src/signalduino.h index b23cba1f..374856a7 100644 --- a/src/signalduino.h +++ b/src/signalduino.h @@ -96,8 +96,9 @@ void setup() { ; // wait for serial port to connect. Needed for native USB } - - + for (uint8_t i=2;i<13;i++) { + pinAsInputPullUp(i); + } //delay(2000); pinAsInput(PIN_RECEIVE); pinAsOutput(PIN_LED); From c6e7fba57c9f916dd3230d94bfe554f7ce5e6cdd Mon Sep 17 00:00:00 2001 From: devzero84 Date: Sun, 13 Jun 2021 08:39:43 +0200 Subject: [PATCH 3/4] Fix wait_Miso defines in cc1101.h (#213) Static variables are only initialized once so the implementation only worked for a total of 255 iterations. After that, functions like cmdStrobe(), readReg() or writeReg() return immediately if the MISO pin is high. The variable miso_count is now out of while's scope and therefore no longer needs to be static. --- src/cc1101.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc1101.h b/src/cc1101.h index 49232f1f..ab20cbb5 100644 --- a/src/cc1101.h +++ b/src/cc1101.h @@ -139,8 +139,8 @@ namespace cc1101 { #endif #endif - #define wait_Miso() while(isHigh(misoPin) ) { static uint8_t miso_count=255;delay(1); if(miso_count==0) return; miso_count--; } // wait until SPI MISO line goes low - #define wait_Miso_rf() while(isHigh(misoPin) ) { static uint8_t miso_count=255;delay(1); if(miso_count==0) return false; miso_count--; } // wait until SPI MISO line goes low + #define wait_Miso() { uint8_t miso_count = 255; while(isHigh(misoPin)) { delay(1); if(miso_count == 0) return ; miso_count--; } } // wait until SPI MISO line goes low + #define wait_Miso_rf() { uint8_t miso_count = 255; while(isHigh(misoPin)) { delay(1); if(miso_count == 0) return false; miso_count--; } } // wait until SPI MISO line goes low #ifdef ARDUINO_MAPLEMINI_F103CB #define cc1101_Select() digitalLow(cc1101::radioCsPin[radionr]) // select (SPI) CC1101 | variant from array, Circuit board for 4 cc110x From 4487c024aaa8b35e2a77b0237f53470fbce6222c Mon Sep 17 00:00:00 2001 From: HomeAutoUser Date: Wed, 23 Jun 2021 22:08:36 +0200 Subject: [PATCH 4/4] Fix - GFSK & nano crash (#211) * dev-r3.5_xFSK Bugfix GFSK - Allows other modulations than ASK / OOK and 2-FSK to be received. * fix nano328 send crash - revised PROGVERS - pins excluded to avoid crash - revised comment & changed pins - revised code PullUp loop https://github.com/RFD-FHEM/SIGNALDuino/pull/211#issuecomment-864606932 --- src/cc1101.cpp | 11 ++++++----- src/compile_config.h | 2 +- src/signalduino.h | 27 ++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/cc1101.cpp b/src/cc1101.cpp index 0f926f95..9ac86814 100644 --- a/src/cc1101.cpp +++ b/src/cc1101.cpp @@ -5,7 +5,7 @@ #endif #define ccMaxBuf 64 // for cc1101 FIFO, variable is better to revised -uint8_t cc1101::ccmode = 3; // MDMCFG2–Modem Configuration Bit 6:4 +uint8_t cc1101::ccmode = 3; // MDMCFG2–Modem Configuration Bit 6:4 default ASK/OOK uint8_t cc1101::revision = 0x01; uint8_t ccBuf[ccMaxBuf]; // for cc1101 FIFO, if Circuit board for more cc110x -> ccBuf expand ( ccBuf[radionr][ccMaxBuf] ) extern volatile bool blinkLED; @@ -247,7 +247,7 @@ void cc1101::writeCCreg(uint8_t reg, uint8_t var) { // write CC1101 register writeReg(reg - EE_CC1101_CFG, var); if (reg - EE_CC1101_CFG == 18) { - ccmode = ( var & 0x70 ) >> 4; // for STM32 - read modulation direct from 0x12 MDMCFG2 + ccmode = ( var & 0x70 ) >> 4; // read modulation direct from 0x12 MDMCFG2 } /* @@ -596,9 +596,9 @@ void cc1101::getRxFifo(uint16_t Boffs) { // xFSK fifoBytes = ccMaxBuf; } dup = readRXFIFO(fifoBytes); - if (cc1101::ccmode != 2 || dup == false) { + if (cc1101::ccmode != 2 || dup == false) { // Ralf9: 2 - FIFO ohne dup - if (cc1101::ccmode != 9) { + if (cc1101::ccmode != 9) { // Ralf9: 9 - FIFO mit Debug Ausgaben MSG_PRINT(char(MSG_START)); // SDC_WRITE not work in this scope MSG_PRINT(F("MN;D=")); } @@ -656,7 +656,8 @@ void cc1101::getRxFifo(uint16_t Boffs) { // xFSK * */ - if (marcstate == 17 || cc1101::ccmode == 0) { // RXoverflow oder LaCrosse? + if (marcstate == 17 || cc1101::ccmode != 3) { // RXoverflow oder nicht ASK/OOK +// if (marcstate == 17 || cc1101::ccmode == 0) { // RXoverflow oder LaCrosse? if (cc1101::flushrx()) { // Flush the RX FIFO buffer cc1101::setReceiveMode(); } diff --git a/src/compile_config.h b/src/compile_config.h index 7cace992..3d246bad 100644 --- a/src/compile_config.h +++ b/src/compile_config.h @@ -45,7 +45,7 @@ */ -#define PROGVERS "3.5.0-dev+20210420" +#define PROGVERS "3.5.0-dev+20210623" #ifdef OTHER_BOARD_WITH_CC1101 #define CMP_CC1101 diff --git a/src/signalduino.h b/src/signalduino.h index 374856a7..f2c3d953 100644 --- a/src/signalduino.h +++ b/src/signalduino.h @@ -96,9 +96,34 @@ void setup() { ; // wait for serial port to connect. Needed for native USB } - for (uint8_t i=2;i<13;i++) { + // defined states - pullup on for unused pins + // start behind RX / TX Pin´s --> all hardware used for system serial 0 & 1 + // not radino (other boards) --> end on Pin 23 + // radino --> end on Pin 29 (CCM_radino_CC1101.pdf | sources In-Circuit -> pins_arduino.h) + for (uint8_t i=2 ; i<=29;i++) { + #ifndef ARDUINO_RADINOCC1101 + if (i>23) break; + #endif + + if (i==LED_BUILTIN) continue; + if (i==PIN_LED) continue; + if (i==PIN_RECEIVE) continue; + if (i==PIN_SEND) continue; + + #ifdef CMP_CC1101 + if (i==MOSI || i==MISO || i==SCK || i==SS) continue; + #endif + + #if defined(ARDUINO_RADINOCC1101) || defined(ARDUINO_ATMEGA328P_MINICUL) + if (i==PIN_MARK433) continue; + + #ifdef ARDUINO_RADINOCC1101 + if (i==8 || i==LED_BUILTIN_RX || i==LED_BUILTIN_TX) continue; // special pin ´s --> ...\packages\In-Circuit\hardware\avr\1.0.0\variants\ictmicro --> pins_arduino.h + #endif + #endif pinAsInputPullUp(i); } + //delay(2000); pinAsInput(PIN_RECEIVE); pinAsOutput(PIN_LED);