Search found 6 matches

by mbrej
Sat Jul 30, 2016 4:56 pm
Forum: General Discussion and Questions
Topic: Get full stack trace in try: catch:
Replies: 7
Views: 14907

Re: Get full stack trace in try: catch:

Many thanks, it works great.
by mbrej
Sun Jul 24, 2016 6:12 pm
Forum: General Discussion and Questions
Topic: Get full stack trace in try: catch:
Replies: 7
Views: 14907

Get full stack trace in try: catch:

Hi, is there any way to get a stack trace while in the 'except' part of a try,except? The best I have got is the error message using: except Exception as e: text = str(e) That however just displays 'MemoryError: memory allocation failed, heap is locked,' while ideally I would line the line number an...
by mbrej
Thu Jul 14, 2016 10:44 pm
Forum: Other Boards
Topic: ADC not working on L4
Replies: 3
Views: 4272

Re: ADC not working on L4

Ive made a little progress on this: https://github.com/micropython/micropython/issues/2243
by mbrej
Thu Jun 02, 2016 11:23 pm
Forum: Other Boards
Topic: ADC not working on L4
Replies: 3
Views: 4272

ADC not working on L4

Hi all, I am trying to get the ADC working on a L4 board. As a simple test, I have tried running the code pyb.ADC(17).read() which should read the internal temperature sensor and return ~1600, but instead 0 is returned. I have also tried reading the value of a pin, but this also returned zero. I had...
by mbrej
Sun May 29, 2016 8:41 pm
Forum: Development of MicroPython
Topic: Accessing the filesystem from a C module
Replies: 2
Views: 3323

Re: Accessing the filesystem from a C module

Thanks, I tried to call the exposed python calls, but I wasnt having much luck. For example, it wasnt obvious how you give a file handle to read, and I couldnt find the difference between the various read functions, or where the relevant code is to look through. In the end, it turned out the library...
by mbrej
Mon May 23, 2016 4:20 pm
Forum: Development of MicroPython
Topic: Accessing the filesystem from a C module
Replies: 2
Views: 3323

Accessing the filesystem from a C module

Hi all, I'm writing a module in C, which needs to access the filesystem. I'm using a STM32. I was looking through the source, and this file seems to expose the file read/write commands: https://github.com/micropython/micropython/blob/master/stmhal/pybstdio.c I note that there are no open/close/list ...