[GitHub] [mynewt-core] vrahane commented on pull request #2671: apps/sensors_test: Remove blinking tasks

2021-08-21 Thread GitBox


vrahane commented on pull request #2671:
URL: https://github.com/apache/mynewt-core/pull/2671#issuecomment-903205152


   Yes, that is correct. It was meant to be same as slinky so that other devs 
could pick it up quite easily. I do agree, reducing the memory usage does make 
sense.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig merged pull request #2669: hw: bsp: frdm-k82f: update LED definitions

2021-08-21 Thread GitBox


utzig merged pull request #2669:
URL: https://github.com/apache/mynewt-core/pull/2669


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[mynewt-core] branch master updated: hw: bsp: frdm-k82f: update LED definitions

2021-08-21 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 38fedd9  hw: bsp: frdm-k82f: update LED definitions
38fedd9 is described below

commit 38fedd9461466174d100539862aebc38c8000985
Author: Fabio Utzig 
AuthorDate: Fri Aug 20 18:15:51 2021 -0300

hw: bsp: frdm-k82f: update LED definitions

Use standard LED_n nomenclature from color name based.

Signed-off-by: Fabio Utzig 
---
 hw/bsp/frdm-k82f/include/bsp/bsp.h | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/bsp/frdm-k82f/include/bsp/bsp.h 
b/hw/bsp/frdm-k82f/include/bsp/bsp.h
index 27c6284..b6103be 100644
--- a/hw/bsp/frdm-k82f/include/bsp/bsp.h
+++ b/hw/bsp/frdm-k82f/include/bsp/bsp.h
@@ -30,10 +30,11 @@ extern uint8_t __DATA_ROM;
 #define RAM_SIZE0x4
 
 /* RBG LED pins */
-#define LED_RED_PIN MCU_GPIO_PORTC(8)
-#define LED_GREEN_PIN   MCU_GPIO_PORTC(9)
-#define LED_BLUE_PINMCU_GPIO_PORTC(10)
-#define LED_BLINK_PIN   LED_RED_PIN
+#define LED_1   MCU_GPIO_PORTC(8)  /* RGB red */
+#define LED_2   MCU_GPIO_PORTC(9)  /* RGB green */
+#define LED_3   MCU_GPIO_PORTC(10) /* RGB blue */
+
+#define LED_BLINK_PIN   LED_1
 
 #ifdef __cplusplus
 }


[GitHub] [mynewt-core] utzig commented on pull request #2671: apps/sensors_test: Remove blinking tasks

2021-08-21 Thread GitBox


utzig commented on pull request #2671:
URL: https://github.com/apache/mynewt-core/pull/2671#issuecomment-903172119


   Looks like it copied the blinking code from slinky.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] kasjer opened a new pull request #2671: apps/sensors_test: Remove blinking tasks

2021-08-21 Thread GitBox


kasjer opened a new pull request #2671:
URL: https://github.com/apache/mynewt-core/pull/2671


   Application defined 2 tasks to blink 1 led.
   It also provided default pin (15) for led if
   BSP did not provide LED_BLINK_PIN definition.
   
   Amount of RAM used for tasks and stacks prevents
   this application to run on MCUs with 20KB of RAM.
   
   This:
   - replaces tasks with callout reducing RAM used.
   - removes local hard coded definition of LED,
 so pin 15 may be used for something else.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig commented on pull request #2670: hw: mcu: kinetis: add MCGIRCLK configuration

2021-08-21 Thread GitBox


utzig commented on pull request #2670:
URL: https://github.com/apache/mynewt-core/pull/2670#issuecomment-903101938


   > Original code used different settings for mcgConfig_BOARD_
   > Now one settings (from syscfg) is used in all places maybe it is OK, I 
don't know.
   
   Yeah, you got a point. It doesn't break anything apart from having a 
different configuration; only one of those is ever used, but there are more 
because this file is basically "auto-generated" and supports different running 
modes (high-speed, low-power). It would be better to remove that code and just 
do the clock configuration based on syscfgs for the changing fields; I'll take 
a look.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig commented on a change in pull request #2669: hw: bsp: frdm-k82f: update LED definitions

2021-08-21 Thread GitBox


utzig commented on a change in pull request #2669:
URL: https://github.com/apache/mynewt-core/pull/2669#discussion_r693341842



##
File path: hw/bsp/frdm-k82f/include/bsp/bsp.h
##
@@ -33,7 +33,9 @@ extern uint8_t __DATA_ROM;
 #define LED_RED_PIN MCU_GPIO_PORTC(8)
 #define LED_GREEN_PIN   MCU_GPIO_PORTC(9)
 #define LED_BLUE_PINMCU_GPIO_PORTC(10)
+
 #define LED_BLINK_PIN   LED_RED_PIN
+#define LED_2   LED_GREEN_PIN

Review comment:
   I switched to using the standard LED_n nomenclature, thanks for the 
suggestion.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig merged pull request #2668: apps: timtest: fix frequency in comments

2021-08-21 Thread GitBox


utzig merged pull request #2668:
URL: https://github.com/apache/mynewt-core/pull/2668


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[mynewt-core] branch master updated: apps: timtest: fix frequency in comments

2021-08-21 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 7961294  apps: timtest: fix frequency in comments
7961294 is described below

commit 7961294b4c73395e21bcb55d2140105cbe5788b8
Author: Fabio Utzig 
AuthorDate: Fri Aug 20 18:11:29 2021 -0300

apps: timtest: fix frequency in comments

Timer configuration frequencies were changed without fixing the
comments.

Signed-off-by: Fabio Utzig 
---
 apps/timtest/src/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/timtest/src/main.c b/apps/timtest/src/main.c
index fe9d0be..7b348e6 100644
--- a/apps/timtest/src/main.c
+++ b/apps/timtest/src/main.c
@@ -154,14 +154,14 @@ init_tasks(void)
 /* Initialize global test semaphore */
 os_sem_init(_test_sem, 0);
 
-/* Initialize timer 0 to count at 1 MHz */
+/* Initialize timer 0 to count at 4 MHz */
 rc = hal_timer_config(TASK1_TIMER_NUM, TASK1_TIMER_FREQ);
 assert(rc == 0);
 
 res = hal_timer_get_resolution(TASK1_TIMER_NUM);
 assert(res == (10 / TASK1_TIMER_FREQ));
 
-/* Initialize timer 1 to count at 250 kHz */
+/* Initialize timer 1 to count at 31250 Hz */
 rc = hal_timer_config(TASK2_TIMER_NUM, TASK2_TIMER_FREQ);
 assert(rc == 0);
 


[GitHub] [mynewt-core] utzig commented on a change in pull request #2669: hw: bsp: frdm-k82f: add LED_2 definition

2021-08-21 Thread GitBox


utzig commented on a change in pull request #2669:
URL: https://github.com/apache/mynewt-core/pull/2669#discussion_r693341029



##
File path: hw/bsp/frdm-k82f/include/bsp/bsp.h
##
@@ -33,7 +33,9 @@ extern uint8_t __DATA_ROM;
 #define LED_RED_PIN MCU_GPIO_PORTC(8)
 #define LED_GREEN_PIN   MCU_GPIO_PORTC(9)
 #define LED_BLUE_PINMCU_GPIO_PORTC(10)
+
 #define LED_BLINK_PIN   LED_RED_PIN
+#define LED_2   LED_GREEN_PIN

Review comment:
   That is not used anywhere afaik, I am not sure why BSPs export it but 
I'll do it here too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig commented on a change in pull request #2670: hw: mcu: kinetis: add MCGIRCLK configuration

2021-08-21 Thread GitBox


utzig commented on a change in pull request #2670:
URL: https://github.com/apache/mynewt-core/pull/2670#discussion_r693340888



##
File path: hw/mcu/nxp/kinetis/syscfg.yml
##
@@ -24,6 +24,17 @@ syscfg.defs:
 value:
 restriction: $notnull
 
+KINETIS_USE_FAST_MCGIRCLK:
+description: >
+Use fast clock for MCGIRCLK. When enabled MCGIRCLK will clock
+at 4MHz; when disabled 32768Hz.
+value: 0
+KINETIS_MCGIRCLK_FCRDIV:
+description: >
+Divider for MCGIRCLK. The divider used equals: value << 1.

Review comment:
   Yep, good catch!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2669: hw: bsp: frdm-k82f: add LED_2 definition

2021-08-21 Thread GitBox


kasjer commented on a change in pull request #2669:
URL: https://github.com/apache/mynewt-core/pull/2669#discussion_r693335098



##
File path: hw/bsp/frdm-k82f/include/bsp/bsp.h
##
@@ -33,7 +33,9 @@ extern uint8_t __DATA_ROM;
 #define LED_RED_PIN MCU_GPIO_PORTC(8)
 #define LED_GREEN_PIN   MCU_GPIO_PORTC(9)
 #define LED_BLUE_PINMCU_GPIO_PORTC(10)
+
 #define LED_BLINK_PIN   LED_RED_PIN
+#define LED_2   LED_GREEN_PIN

Review comment:
   What happened to LED_1? :frowning: 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2670: hw: mcu: kinetis: add MCGIRCLK configuration

2021-08-21 Thread GitBox


kasjer commented on a change in pull request #2670:
URL: https://github.com/apache/mynewt-core/pull/2670#discussion_r69068



##
File path: hw/mcu/nxp/kinetis/syscfg.yml
##
@@ -24,6 +24,17 @@ syscfg.defs:
 value:
 restriction: $notnull
 
+KINETIS_USE_FAST_MCGIRCLK:
+description: >
+Use fast clock for MCGIRCLK. When enabled MCGIRCLK will clock
+at 4MHz; when disabled 32768Hz.
+value: 0
+KINETIS_MCGIRCLK_FCRDIV:
+description: >
+Divider for MCGIRCLK. The divider used equals: value << 1.

Review comment:
   Maybe it should be:
   ```
   Divider for MCGIRCLK. The divider used equals: 1 << value.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org