Yes, I'm doing that and getting results. The rtc.init() was from a while back searching through the forum posts.I just instantiate the RTC and, if it's not battery-backed, set it.
Search found 191 matches
- Sun Apr 29, 2018 8:38 pm
- Forum: General Discussion and Questions
- Topic: Using the RTC
- Replies: 2
- Views: 2177
Re: Using the RTC
- Sat Apr 28, 2018 5:11 pm
- Forum: General Discussion and Questions
- Topic: Using the RTC
- Replies: 2
- Views: 2177
Using the RTC
I found a post from a year ago where they changed this in main.c to get RTC going: main.c: rtc_init_start(false); Is that still required? Testing similar to https://forum.micropython.org/viewtopic.php?f=12&t=3086&hilit=RTC+setting&start=10#p18398 shows that main.c is OK as is now -- the RTC is count...
- Sat Apr 28, 2018 2:31 pm
- Forum: General Discussion and Questions
- Topic: USB MSC mode, #define MICROPY_HW_USB_FS, datalogging
- Replies: 2
- Views: 2509
USB MSC mode, #define MICROPY_HW_USB_FS, datalogging
Are these two independent? When I change to pyb.usb_mode('VCP') in boot.py, I can use the virtual drive /flash while using rshell, and then I do not get a pop up window for a USB "drive", so I am thinking yes independent. Is there still a reason to change mode to pyb.usb_mode(None) to avoid file cor...
- Thu Apr 26, 2018 7:24 pm
- Forum: General Discussion and Questions
- Topic: USB OTG role and MICROPY_HW_USB_VBUS_DETECT_PIN
- Replies: 2
- Views: 2650
Re: USB OTG role and MICROPY_HW_USB_VBUS_DETECT_PIN
The review of how micropython handles VBUS detecting helped me debug my new platform all the way last night. Once I dropped the assumption that the last command given would be the one taking effect, I was able to think of shutting off USB completely in boot.py, then I coiuld get GPIO PA11 PA12 PA9 t...
- Wed Apr 25, 2018 2:53 pm
- Forum: Other Boards
- Topic: [STM32F401CE] debugging a new board definition [solved]
- Replies: 49
- Views: 27292
Re: [STM32F401CE] debugging a new board definition [solved]
I'm close but still have a problem with USB pins not functioning as USB when using board definition from G30TH with minor changes. Before an attempt to toggle pinA11 as GPIO output with machine.pin command, I set the USB mode with this: pyb.usb_mode('VCP') in boot.py Next I modified the code but cou...
- Sun Apr 22, 2018 5:35 pm
- Forum: General Discussion and Questions
- Topic: Does using pyb.repl_uart(uart) stop the USB REPL?
- Replies: 0
- Views: 1668
Does using pyb.repl_uart(uart) stop the USB REPL?
I have a REPL on the uart from using this code: import pyb uart = pyb.UART(2, 4800) pyb.repl_uart(uart) Supporting that in mpconfigboard.h are these lines: #define MICROPY_HW_ENABLE_USB (1) // USB config #define MICROPY_HW_USB_FS (1) // recognizing a USB host requires VBUS_DETECT_PIN #define MICROPY...
- Sun Apr 22, 2018 2:35 am
- Forum: Other Boards
- Topic: [STM32F401CE] debugging a new board definition [solved]
- Replies: 49
- Views: 27292
Re: [STM32F401CE] debugging a new board definition
I can load code via the SWD pins via a FT2232H minimodule, and get LEDs to change reliably. I noticed some PA2 bitstream going out during some of the flash_error conditions before frozen code was completely working. I pored over the mpconfigboard.h files and simplified the main.py I am loading as fr...
- Sat Apr 21, 2018 7:04 pm
- Forum: General Discussion and Questions
- Topic: USB OTG role and MICROPY_HW_USB_VBUS_DETECT_PIN
- Replies: 2
- Views: 2650
USB OTG role and MICROPY_HW_USB_VBUS_DETECT_PIN
Does MICROPY_HW_USB_VBUS_DETECT_PIN have anything to do with OTG roles, or is it true the micropython board is a peripheral and VBUS detect is used so the USB code can be idle when VBUS is low, and go into action when something is plugged in? Seems that way from the specs: "Connect requests (D+ or D...
- Sat Apr 21, 2018 12:23 am
- Forum: Other Boards
- Topic: [STM32F401CE] debugging a new board definition [solved]
- Replies: 49
- Views: 27292
Re: [STM32F401CE] debugging a new board definition
f you copy your main.py (that you're freezing) to a G30TH or a pyboard, and try to import it (call it something else other than main.py for this) do you get any errors? pintest2.py imports instantly on a G30TH accessed via USB REPL and rshell. pintest.py import pintest takes 16 seconds to give a >>...
- Fri Apr 20, 2018 10:10 pm
- Forum: Other Boards
- Topic: [STM32F401CE] debugging a new board definition [solved]
- Replies: 49
- Views: 27292
Re: [STM32F401CE] debugging a new board definition
I stopwatch clock the flashes at 7.95 sec for 4 sets of 0 and 1 with delay(1000) between, so that matches up reality with internal clock referenced time units.
This was after I changed HSE VALUE to 16000000. No out on serial port TX pin A2 now.
This was after I changed HSE VALUE to 16000000. No out on serial port TX pin A2 now.