[En-Nut-Discussion] STM32F103 USART

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed Oct 14 12:41:36 CEST 2015


>>>>> "Achim" == Achim  <achim_muc1971 at gmx.de> writes:

    Achim> Hi Uwe, sorry fort he rare information, but I´m just starting the
    Achim> UART-Project with a few lines of code...

    Achim> the _write and _read functions in your example work, but my
    Achim> problem is, that I wantg to use interrupt functionality for
    Achim> receive.

Again, you don't tell _want_ functionality you want to achieve. The NutOs
usart driver framework is quite powerfull. Maybe it is already done. Or it
has some common interest, than implementing it inside NutOs would be usefull.

    Achim> I´ve now gone step by step through the code. If I understood it
    Achim> right, all the interrupts are handled inside stm32_usart.c by
    Achim> writing all received data into a ringbuffer - right?  Hence I
    Achim> think about what´s the best way to have my own RX-Interrupt
    Achim> handler...

    Achim> When debugging NutRegisterDevice calls UsartInit() und this calls
    Achim> Stm32UsartInit(). Within this function The Interrupt-Handler with
    Achim> buffer functionality is called. Hence I see no way to implement
    Achim> my own Interrupt-Handler without modifications in nut/os - right?

If the function you need is not implemented and can't be implemented in a
sensible way with existing NutOs functionality, you have to implement it
yourself. Either inside NutOs or in your user code. Remember, your user code
has the same rights everything than has the NutOs kernel.

B.t.w. I requested you to point out more exactly what problems Clock setup
on F1 has and how you solved it. An answer is still pending.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list