Coder Social home page Coder Social logo

bse_project's Introduction

BSE_Project

This project was some school work done at CPE Lyon. We had a specification to follow, as well as checkpoints to validate our work (hence the different phase branches). Please note that code in these branches may not work, since we may have used other means to validate these checkpoints. BSE stands for "Base des Systèmes Embarqués", or introduction to embedded systems, and is one of the modules of the fourth year at CPE Lyon in our speciality. You can find the complete specification (albeit in French) in the corresponding folder. We tried our best to write everything in English, but some French must have slipped here and there. As of now, the files that were provided to us are not translated yet.

The whole project is available under the GPL.V3 License, excepted the specification, which is released as CC BY-NC-ND 4.0, since we are not the crators. If you want to create derivative works from the specification, please contact either us or CPE Lyon, explaining your request. If you contact us, we will forward your request to the right person.

What works

Everything more or less works, but we didn't have time to completely debug some functionalities :

  • The Send_String function sometimes returns without completing. A check has been added to be able to use the UART correctly.
  • There might be some other bugs that we didn't find about yet, unfortunately. Also, we might have forgotten to merge bugfixes between branches.

Compilation warning : A function has been excluded from the overlay analysis. Be sure to add the LIB_BSE_linker_command.lin file as the linker script.

What works :

  • The ADC works
  • When recieving R, correct status information is sent trough the UART
  • The external interrupt works
  • Every error is displayed trough the UART
  • The RTC and its associated functions (reset...) works
  • The correct information is sent to the printer
  • Packages are correctly detected and identified
  • Weighing works
  • Pulses to activate pistons works

Program architecture

The main program initializes the device, then launches an infinite loop, waiting for instructions from the UART, or for strings to send to the UART.

Then, everything happens in the Timer 2 ISR, which is triggered every 5ms. This ISR keeps a RTC, and calls the central brain of the program, which is the event dispatcher. This one can be thought as a scheduler, bearing some similarities in structure with some RT kernels.

The scheduler first checks inputs, also calling a package management subsystems. This subsystem detects incoming packages, and adds event to the queue depending on the detected package. Then, the event dispatcher checks if the queued items can be acomplished, and does so if possible.

An other source of async event is the INT1, which adds an event to the queue.

If the system is in error mode, it just refuses to add events to the queue. We could have just filtered out the events depending on whether they could be processed safely, but chose to go this way for a bit of extra safety.

bse_project's People

Contributors

alperenaydin avatar mayeulc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.