Error Handling In Spi
Visited Search Results View More Blog Recent Blog Posts View More PMs Unread PMs Inbox Send New PM View More Page Extras Menu Forum Themes Elegant Mobile Home » All Forums » [8-Bit Microcontrollers] » Peripherals / Core Independent Peripherals » Communications (EUSART/AUSART, I2C/SPI, USB, CAN, LIN, KeeLoq) » SPI Error Handling Mark Thread UnreadFlat Reading Mode❐ SPI Error Handling Author Post Essentials Only Full Version bwalpole Starting Member Total Posts : 46 Reward points : 0 Joined: 2006/11/20 04:30:32Location: 0 Status: offline 2008/04/02 02:00:06 (permalink) 0 SPI Error Handling Hi, I've got a few questions about SPI error handling, Is a receive overrun the only error that can occur? The only one for which there is an associatedstatus bit? I believe an interrupt is generated if you get an error? Does this have its own vector or does it go into the SPI interrupt? Will this only happen if interrupts are enabled for the SPI port. If this error does occur what should you do to properly clear it? Clear the receive buffer and re-enable the SPI port and interrupt. Thanks Ben #1 14 Replies Related Threads tunelabguy Super Member Total Posts : 1655 Reward points : 0 Joined: 2005/04/03 08:30:19Location: Hopkins, MN USA Status: offline RE: SPI Error Handling 2008/04/03 06:54:47 (permalink) 0 Looking at the 14-bit core PICs, in addition to the receive overflow (SSPOV) bit, there is also a write collision bit (WCOL). This error bit is set if you write to SSPBUF while it is still transmitting the previous word. Neither of these errors cause a specific interrupt. The only interrupt assoicated with the SPI is the SSPIF bit, which is set when a byte has finished transferring. The WCOL error bit can be cleared directly software. I think the SSPOV bit is also cleared explicitly. Neither bit has to be cleared to allow operation to continue. But not clearing them prevents you from detecting new errors. How you recover from these errors depends on your applicatio
[PATCH] ICH SPI paranoid error handling Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] * Carl-Daniel Hailfinger
set of functions in C that will ultimately be called from anenterprise java bean. I expected that when calling SPI_exec(sql, 0) it http://grokbase.com/t/postgresql/pgsql-general/06ackxbymr/sql-syntax-error-handling-within-spi-functions-in-c wouldreturn an error code if "sql" contained a syntax error. At that point Iwould be able to return my own (more meaningful) error message based on theerror thrown.Instead http://www.gossamer-threads.com/lists/linux/kernel/2239478 an SQLException is thrown, and any error detection and processingcode in the SPI function is bypassed. Is this the only error reportingmodel, or can I trap SQL error handling errors within my functions? I'm using postgreSQLversion 7.4.2 on Red Hat Linux version 9 and can't upgrade at the moment.Thanks in advance for your help,Stuart MorseOptimedia Solutions1247 Knockan DriveVictoria, BC, V8Z 7B8(250) 658-8104 ph(250) 658-8146 faxstuart@optimediasolutions.cahttp://www.optimediasolutions.ca/ reply Tweet Search Discussions Search All Groups PostgreSQL pgsql-general 1 response Oldest Nested Martijn van Oosterhout Find the section in error handling in the docs on exception handling. The rule is basically: if the function gets an error it won't return. For this reason you never have to check if palloc() returns NULL. It really can't happen. There are try/catch blocks you can install to catch errors. pl/pgsql does this for example. Note it is slightly expensive, so you're usually better off avoiding errors you know you're going to ignore anyway. An error will abort the current transaction, no changing that, you use Martijn van Oosterhout at Oct 13, 2006 at 8:27 pm ⇧ On Thu, Oct 12, 2006 at 02:29:27PM -0700, Stuart Morse wrote:Hi,I've written a set of functions in C that will ultimately be called from anenterprise java bean. I expected that when calling SPI_exec(sql, 0) it wouldreturn an error code if "sql" contained a syntax error. At that point Iwould be able to return my own (more meaningful) error message based on theerror thrown.Find the section in the docs on exception handling. The rul
Aug14,2015,6:51PM Post #1 of 2 (96 views) Permalink RE: [PATCH v4 0/7] Add spi-nor SPI transfer error handling >Hello, >with these patches SPI transfer errors are not silently ignored but rather reported to spi-nor users. >This should prevent silently dropping data to the floor in cases when the SPI transfer fails and the failure is detected. >It has been pointed out that MTD users do not handle the case when data is read only partially so this version adds the last patch which handles this in spi-nor. >Thanks >Michal Seems parallel nand read/write also has the same condition. 칻&~&+-ݶw˛mbdzޖ)w*jgݢj/zޖ2ޙ&)ߡaGhj:+vw٥>WiaxPjm -+d_ hramrach at gmail Aug16,2015,3:20AM Post #2 of 2 (76 views) Permalink Re: [PATCH v4 0/7] Add spi-nor SPI transfer error handling [In reply to] Hello, On 15 August 2015 at 03:51, Bean Huo 霍斌斌 (beanhuo) <beanhuo [at] micron> wrote: >>Hello, > >>with these patches SPI transfer errors are not silently ignored but rather reported to spi-nor users. > >>This should prevent silently dropping data to the floor in cases when the SPI transfer fails and the failure is detected. > >>It has been pointed out that MTD users do not handle the case when data is read only partially so this version adds the last patch which handles this in spi-nor. > >>Thanks > >>Michal > Seems parallel nand read/write also has the same condition. I am not familiar with parallel NAND drivers so I have no idea if parallel nand can fail in similar way. As I understand it the parallel nand controller is dedicated piece of hardware just for accessing the nand so there may not be any problems similar to what the generic SPI bus has. Thanks Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo [at] vger More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ Index | Next | Previous | Print Thread | View Threaded Linux Kernel Interested in having your list archived? Contact Gossamer Threads Web Applications & Managed Hosting Powered by Gossamer Threads Inc.